ConnectionInterface
interface ConnectionInterface (View source)
Methods
Get a new raw query expression.
Run a select statement and return a single result.
Run a select statement against the database.
Run an insert statement against the database.
Run an update statement against the database.
Run a delete statement against the database.
Execute an SQL statement and return the boolean result.
Run an SQL statement and get the number of rows affected.
Run a raw, unprepared query against the PDO connection.
Prepare the query bindings for execution.
Start a new database transaction.
Commit the active database transaction.
Rollback the active database transaction.
Get the number of active transactions.
Details
at line 23
Expression
raw(mixed $value)
Get a new raw query expression.
at line 32
mixed
selectOne(string $query, array $bindings = [])
Run a select statement and return a single result.
at line 41
array
select(string $query, array $bindings = [])
Run a select statement against the database.
at line 50
bool
insert(string $query, array $bindings = [])
Run an insert statement against the database.
at line 59
int
update(string $query, array $bindings = [])
Run an update statement against the database.
at line 68
int
delete(string $query, array $bindings = [])
Run a delete statement against the database.
at line 77
bool
statement(string $query, array $bindings = [])
Execute an SQL statement and return the boolean result.
at line 86
int
affectingStatement(string $query, array $bindings = [])
Run an SQL statement and get the number of rows affected.
at line 94
bool
unprepared(string $query)
Run a raw, unprepared query against the PDO connection.
at line 102
array
prepareBindings(array $bindings)
Prepare the query bindings for execution.
at line 113
mixed
transaction(Closure $callback, int $attempts = 1)
Execute a Closure within a transaction.
at line 120
void
beginTransaction()
Start a new database transaction.
at line 127
void
commit()
Commit the active database transaction.
at line 134
void
rollBack()
Rollback the active database transaction.
at line 141
int
transactionLevel()
Get the number of active transactions.