connect()
connect() : boolean
Establishes a connection to the database server.
Returns
boolean —True on success, false on failure.
Interface for database driver.
prepare(string|\Cake\Database\Query $query) : \Cake\Database\StatementInterface
Prepares a sql statement to be executed.
string|\Cake\Database\Query | $query | The query to turn into a prepared statement. |
queryTranslator(string $type) : callable
Returns a callable function that will be used to transform a passed Query object.
This function, in turn, will return an instance of a Query object that has been transformed to accommodate any specificities of the SQL dialect in use.
string | $type | The type of query to be transformed (select, insert, update, delete). |
schemaDialect() : \Cake\Database\Schema\BaseSchema
Get the schema dialect.
Used by Cake\Database\Schema package to reflect schema and generate schema.
If all the tables that use this Driver specify their own schemas, then this may return null.
lastInsertId(string|null $table = null, string|null $column = null) : string|integer
Returns last id generated for a table or sequence in database.
string|null | $table | table name or sequence to get last insert value from. |
string|null | $column | the name of the column representing the primary key. |
compileQuery(\Cake\Database\Query $query, \Cake\Database\ValueBinder $generator) : array
Transforms the passed query to this Driver's dialect and returns an instance of the transformed query and the full compiled SQL string.
\Cake\Database\Query | $query | The query to compile. |
\Cake\Database\ValueBinder | $generator | The value binder to use. |
containing 2 entries. The first entity is the transformed query and the second one the compiled SQL.
newCompiler() : \Cake\Database\QueryCompiler
Returns an instance of a QueryCompiler.