ConnectionInterface
in
Table of Contents
- affectingStatement() : int
- Run an SQL statement and get the number of rows affected.
- beginTransaction() : void
- Start a new database transaction.
- commit() : void
- Commit the active database transaction.
- delete() : int
- Run a delete statement against the database.
- insert() : bool
- Run an insert statement against the database.
- prepareBindings() : array<string|int, mixed>
- Prepare the query bindings for execution.
- pretend() : array<string|int, mixed>
- Execute the given callback in "dry run" mode.
- raw() : Expression
- Get a new raw query expression.
- rollBack() : void
- Rollback the active database transaction.
- select() : array<string|int, mixed>
- Run a select statement against the database.
- selectOne() : mixed
- Run a select statement and return a single result.
- statement() : bool
- Execute an SQL statement and return the boolean result.
- table() : Builder
- Begin a fluent query against a database table.
- transaction() : mixed
- Execute a Closure within a transaction.
- transactionLevel() : int
- Get the number of active transactions.
- unprepared() : bool
- Run a raw, unprepared query against the PDO connection.
- update() : int
- Run an update statement against the database.
Methods
affectingStatement()
Run an SQL statement and get the number of rows affected.
public
affectingStatement(string $query[, array<string|int, mixed> $bindings = [] ]) : int
Parameters
- $query : string
- $bindings : array<string|int, mixed> = []
Return values
int —beginTransaction()
Start a new database transaction.
public
beginTransaction() : void
Return values
void —commit()
Commit the active database transaction.
public
commit() : void
Return values
void —delete()
Run a delete statement against the database.
public
delete(string $query[, array<string|int, mixed> $bindings = [] ]) : int
Parameters
- $query : string
- $bindings : array<string|int, mixed> = []
Return values
int —insert()
Run an insert statement against the database.
public
insert(string $query[, array<string|int, mixed> $bindings = [] ]) : bool
Parameters
- $query : string
- $bindings : array<string|int, mixed> = []
Return values
bool —prepareBindings()
Prepare the query bindings for execution.
public
prepareBindings(array<string|int, mixed> $bindings) : array<string|int, mixed>
Parameters
- $bindings : array<string|int, mixed>
Return values
array<string|int, mixed> —pretend()
Execute the given callback in "dry run" mode.
public
pretend(Closure $callback) : array<string|int, mixed>
Parameters
- $callback : Closure
Return values
array<string|int, mixed> —raw()
Get a new raw query expression.
public
raw(mixed $value) : Expression
Parameters
- $value : mixed
Return values
Expression —rollBack()
Rollback the active database transaction.
public
rollBack() : void
Return values
void —select()
Run a select statement against the database.
public
select(string $query[, array<string|int, mixed> $bindings = [] ]) : array<string|int, mixed>
Parameters
- $query : string
- $bindings : array<string|int, mixed> = []
Return values
array<string|int, mixed> —selectOne()
Run a select statement and return a single result.
public
selectOne(string $query[, array<string|int, mixed> $bindings = [] ]) : mixed
Parameters
- $query : string
- $bindings : array<string|int, mixed> = []
Return values
mixed —statement()
Execute an SQL statement and return the boolean result.
public
statement(string $query[, array<string|int, mixed> $bindings = [] ]) : bool
Parameters
- $query : string
- $bindings : array<string|int, mixed> = []
Return values
bool —table()
Begin a fluent query against a database table.
public
table(string $table) : Builder
Parameters
- $table : string
Return values
Builder —transaction()
Execute a Closure within a transaction.
public
transaction(Closure $callback[, int $attempts = 1 ]) : mixed
Parameters
- $callback : Closure
- $attempts : int = 1
Tags
Return values
mixed —transactionLevel()
Get the number of active transactions.
public
transactionLevel() : int
Return values
int —unprepared()
Run a raw, unprepared query against the PDO connection.
public
unprepared(string $query) : bool
Parameters
- $query : string
Return values
bool —update()
Run an update statement against the database.
public
update(string $query[, array<string|int, mixed> $bindings = [] ]) : int
Parameters
- $query : string
- $bindings : array<string|int, mixed> = []