AdapterInterface
in
Db adapter interface
Tags
Table of Contents
- beginTransaction() : AdapterInterface
- Begin a transaction
- bindParams() : AdapterInterface
- Bind parameters to a prepared SQL query
- clearError() : AdapterInterface
- Clear the error
- clearProfiler() : AdapterInterface
- Clear query profiler
- commit() : AdapterInterface
- Commit a transaction
- connect() : AdapterInterface
- Connect to the database
- createSchema() : Schema
- Create Schema builder
- createSql() : Sql
- Create SQL builder
- disconnect() : void
- Disconnect from the database
- escape() : string
- Escape the value
- execute() : AdapterInterface
- Execute a prepared SQL query
- fetch() : array<string|int, mixed>
- Fetch and return a row from the result
- fetchAll() : array<string|int, mixed>
- Fetch and return all rows from the result
- getConnection() : mixed
- Get the connection object/resource
- getError() : mixed
- Get the error
- getLastId() : int
- Return the last ID of the last query
- getNumberOfRows() : int
- Return the number of rows from the last query
- getOptions() : array<string|int, mixed>
- Get database connection options
- getProfiler() : Profiler
- Get query profiler
- getResult() : mixed
- Get the result object/resource
- getStatement() : mixed
- Get the statement object/resource
- getTables() : array<string|int, mixed>
- Return the tables in the database
- getVersion() : string
- Return the database version
- hasError() : bool
- Determine whether or not there is an error
- hasOptions() : bool
- Has database connection options
- hasResult() : bool
- Determine whether or not a result resource exists
- hasStatement() : bool
- Determine whether or not a statement resource exists
- hasTable() : bool
- Return if the database has a table
- isConnected() : bool
- Determine whether or not connected
- listen() : AdapterInterface
- Add query listener to the adapter
- prepare() : AdapterInterface
- Prepare a SQL query.
- query() : AdapterInterface
- Execute a SQL query directly
- rollback() : AdapterInterface
- Rollback a transaction
- setError() : AdapterInterface
- Set the error
- setOptions() : AdapterInterface
- Set database connection options
- setProfiler() : AdapterInterface
- Set query profiler
- throwError() : void
- Throw a database error exception
Methods
beginTransaction()
Begin a transaction
public
beginTransaction() : AdapterInterface
Return values
AdapterInterface —bindParams()
Bind parameters to a prepared SQL query
public
bindParams(array<string|int, mixed> $params) : AdapterInterface
Parameters
- $params : array<string|int, mixed>
Return values
AdapterInterface —clearError()
Clear the error
public
clearError() : AdapterInterface
Return values
AdapterInterface —clearProfiler()
Clear query profiler
public
clearProfiler() : AdapterInterface
Return values
AdapterInterface —commit()
Commit a transaction
public
commit() : AdapterInterface
Return values
AdapterInterface —connect()
Connect to the database
public
connect([array<string|int, mixed> $options = [] ]) : AdapterInterface
Parameters
- $options : array<string|int, mixed> = []
Return values
AdapterInterface —createSchema()
Create Schema builder
public
createSchema() : Schema
Return values
Schema —createSql()
Create SQL builder
public
createSql() : Sql
Return values
Sql —disconnect()
Disconnect from the database
public
disconnect() : void
Return values
void —escape()
Escape the value
public
escape(string $value) : string
Parameters
- $value : string
Return values
string —execute()
Execute a prepared SQL query
public
execute() : AdapterInterface
Return values
AdapterInterface —fetch()
Fetch and return a row from the result
public
fetch() : array<string|int, mixed>
Return values
array<string|int, mixed> —fetchAll()
Fetch and return all rows from the result
public
fetchAll() : array<string|int, mixed>
Return values
array<string|int, mixed> —getConnection()
Get the connection object/resource
public
getConnection() : mixed
Return values
mixed —getError()
Get the error
public
getError() : mixed
Return values
mixed —getLastId()
Return the last ID of the last query
public
getLastId() : int
Return values
int —getNumberOfRows()
Return the number of rows from the last query
public
getNumberOfRows() : int
Return values
int —getOptions()
Get database connection options
public
getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed> —getProfiler()
Get query profiler
public
getProfiler() : Profiler
Return values
Profiler —getResult()
Get the result object/resource
public
getResult() : mixed
Return values
mixed —getStatement()
Get the statement object/resource
public
getStatement() : mixed
Return values
mixed —getTables()
Return the tables in the database
public
getTables() : array<string|int, mixed>
Return values
array<string|int, mixed> —getVersion()
Return the database version
public
getVersion() : string
Return values
string —hasError()
Determine whether or not there is an error
public
hasError() : bool
Return values
bool —hasOptions()
Has database connection options
public
hasOptions() : bool
Return values
bool —hasResult()
Determine whether or not a result resource exists
public
hasResult() : bool
Return values
bool —hasStatement()
Determine whether or not a statement resource exists
public
hasStatement() : bool
Return values
bool —hasTable()
Return if the database has a table
public
hasTable(string $table) : bool
Parameters
- $table : string
Return values
bool —isConnected()
Determine whether or not connected
public
isConnected() : bool
Return values
bool —listen()
Add query listener to the adapter
public
listen(mixed $listener) : AdapterInterface
Parameters
- $listener : mixed
Return values
AdapterInterface —prepare()
Prepare a SQL query.
public
prepare(string $sql) : AdapterInterface
Parameters
- $sql : string
Return values
AdapterInterface —query()
Execute a SQL query directly
public
query(string $sql) : AdapterInterface
Parameters
- $sql : string
Return values
AdapterInterface —rollback()
Rollback a transaction
public
rollback() : AdapterInterface
Return values
AdapterInterface —setError()
Set the error
public
setError(string $error) : AdapterInterface
Parameters
- $error : string
Return values
AdapterInterface —setOptions()
Set database connection options
public
setOptions(array<string|int, mixed> $options) : AdapterInterface
Parameters
- $options : array<string|int, mixed>
Return values
AdapterInterface —setProfiler()
Set query profiler
public
setProfiler(Profiler $profiler) : AdapterInterface
Parameters
- $profiler : Profiler
Return values
AdapterInterface —throwError()
Throw a database error exception
public
throwError() : void