PDO driver trait
$_connection
protected PDO|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
_connect( string $dsn , array $config )
Establishes a connection to the database server
$dsn
$config
beginTransaction( )
Starts a transaction
commitTransaction( )
Commits a transaction
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 isConnected( )
Checks whether or not the driver is connected.
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 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
rollbackTransaction( )
Rollback a transaction
supportsQuoting( )
Checks if the driver supports quoting, as PDO_ODBC does not support it.
© 2005–2017 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.
https://api.cakephp.org/3.4/class-Cake.Database.Driver.PDODriverTrait.html