ConnectionInterface
Methods
selectOne ( $query , $bindings , $useReadPdo ) : mixed
Run a select statement and return a single result.
Parameters
- $query string
- $bindings array
- $useReadPdo bool
scalar ( $query , $bindings , $useReadPdo ) : mixed
Run a select statement and return the first column of the first row.
Parameters
- $query string
- $bindings array
- $useReadPdo bool
select ( $query , $bindings , $useReadPdo ) : array
Run a select statement against the database.
Parameters
- $query string
- $bindings array
- $useReadPdo bool
cursor ( $query , $bindings , $useReadPdo ) : Generator
Run a select statement against the database and returns a generator.
Parameters
- $query string
- $bindings array
- $useReadPdo bool
insert ( $query , $bindings ) : bool
Run an insert statement against the database.
Parameters
- $query string
- $bindings array
update ( $query , $bindings ) : int
Run an update statement against the database.
Parameters
- $query string
- $bindings array
delete ( $query , $bindings ) : int
Run a delete statement against the database.
Parameters
- $query string
- $bindings array
statement ( $query , $bindings ) : bool
Execute an SQL statement and return the boolean result.
Parameters
- $query string
- $bindings array
affectingStatement ( $query , $bindings ) : int
Run an SQL statement and get the number of rows affected.
Parameters
- $query string
- $bindings array
unprepared ( $query ) : bool
Run a raw, unprepared query against the PDO connection.
Parameters
- $query string
prepareBindings ( array $bindings ) : array
Prepare the query bindings for execution.
Parameters
- $bindings array
transaction ( Closure $callback , $attempts ) : mixed
Execute a Closure within a transaction.
Parameters
- $callback Closure
- $attempts int
beginTransaction ( ) : void
Start a new database transaction.
commit ( ) : void
Commit the active database transaction.
rollBack ( ) : void
Rollback the active database transaction.
transactionLevel ( ) : int
Get the number of active transactions.
pretend ( Closure $callback ) : array
Execute the given callback in "dry run" mode.
Parameters
- $callback Closure
getDatabaseName ( ) : string
Get the name of the connected database.