PDO driver trait
_connect( string $dsn , array $config )
Establishes a connection to the database server
$dsn
$config
boolean
beginTransaction( )
Starts a transaction
boolean
commitTransaction( )
Commits a transaction
boolean
connection( null|PDO $connection null )
Returns correct connection resource or object that is internally used If first argument is passed, it will set internal connection object or result to the value passed
$connection
optional null PDO
isConnected( )
Check whether or not the driver is connected.
boolean
lastInsertId( string|null $table null , string|null $column null )
Returns last id generated for a table or sequence in database
$table
optional null $column
optional null string|integer
prepare( string|Cake\Database\Query $query )
Prepares a sql statement to be executed
Cake\Database\Query
$query
Cake\Database\StatementInterface
quote( mixed $value , string $type )
Returns a value in a safe representation to be used in a query string
$value
$type
string
rollbackTransaction( )
Rollsback a transaction
boolean
supportsQuoting( )
Checks if the driver supports quoting, as PDO_ODBC does not support it.
boolean
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
http://api.cakephp.org/3.1/class-Cake.Database.Driver.PDODriverTrait.html