Connection::prepareQuery

public Connection::prepareQuery($query) Prepares a query string and returns the prepared statement. This method caches prepared statements, reusing them when possible. It also prefixes tables names enclosed in curly-braces. Parameters $query: The query string as SQL, with curly-braces surrounding the table names. Return value \Drupal\Core\Database\StatementInterface A PDO prepared statement ready for its execute() method. Overrides Connection::prepareQuery File core/lib/Drupal/Core/Database/D

Connection::prepareQuery

public Connection::prepareQuery($query) Prepares a query string and returns the prepared statement. This method caches prepared statements, reusing them when possible. It also prefixes tables names enclosed in curly-braces. Parameters $query: The query string as SQL, with curly-braces surrounding the table names. Return value \Drupal\Core\Database\StatementInterface A PDO prepared statement ready for its execute() method. File core/lib/Drupal/Core/Database/Connection.php, line 386 Class C

Connection::prepare

public Connection::prepare($statement, array $driver_options = array()) Prepares a statement for execution and returns a statement object Emulated prepared statements does not communicate with the database server so this method does not check the statement. Parameters string $statement: This must be a valid SQL statement for the target database server. array $driver_options: (optional) This array holds one or more key=>value pairs to set attribute values for the PDOStatement object that thi

Connection::prepare

public Connection::prepare($statement, array $driver_options = array()) Prepares a statement for execution and returns a statement object Emulated prepared statements does not communicate with the database server so this method does not check the statement. Parameters string $statement: This must be a valid SQL statement for the target database server. array $driver_options: (optional) This array holds one or more key=>value pairs to set attribute values for the PDOStatement object that thi

Connection::prefixTables

public Connection::prefixTables($sql) Appends a database prefix to all tables in a query. Queries sent to Drupal should wrap all table names in curly brackets. This function searches for this syntax and adds Drupal's table prefix to all tables, allowing Drupal to coexist with other systems in the same database and/or schema if necessary. Parameters string $sql: A string containing a partial or entire SQL query. Return value string The properly-prefixed string. File core/lib/Drupal/Core/Databa

Connection::POSTGRESQL_NEXTID_LOCK

The name by which to obtain a lock for retrieve the next insert id. File core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php, line 22 Class Connection PostgreSQL implementation of \Drupal\Core\Database\Connection. Namespace Drupal\Core\Database\Driver\pgsql Code const POSTGRESQL_NEXTID_LOCK = 1000;

Connection::popTransaction

public Connection::popTransaction($name) Decreases the depth of transaction nesting. If we pop off the last transaction layer, then we either commit or roll back the transaction as necessary. If no transaction is active, we return because the transaction may have manually been rolled back. Parameters string $name: The name of the savepoint. Throws \Drupal\Core\Database\TransactionNoActiveException \Drupal\Core\Database\TransactionCommitFailedException See also \Drupal\Core\Database\Transacti

Connection::popCommittableTransactions

protected Connection::popCommittableTransactions() Internal function: commit all the transaction layers that can commit. File core/lib/Drupal/Core/Database/Connection.php, line 1169 Class Connection Base Database API class. Namespace Drupal\Core\Database Code protected function popCommittableTransactions() { // Commit all the committable layers. foreach (array_reverse($this->transactionLayers) as $name => $active) { // Stop once we found an active transaction. if ($ac

Connection::popCommittableTransactions

protected Connection::popCommittableTransactions() Overridden to work around issues to MySQL not supporting transactional DDL. Overrides Connection::popCommittableTransactions File core/lib/Drupal/Core/Database/Driver/mysql/Connection.php, line 288 Class Connection MySQL implementation of \Drupal\Core\Database\Connection. Namespace Drupal\Core\Database\Driver\mysql Code protected function popCommittableTransactions() { // Commit all the committable layers. foreach (array_reverse($t

Connection::open

public static Connection::open(array &$connection_options = array()) Opens a PDO connection. Parameters array $connection_options: The database connection settings array. Return value \PDO A \PDO object. Overrides Connection::open File core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php, line 92 Class Connection SQLite implementation of \Drupal\Core\Database\Connection. Namespace Drupal\Core\Database\Driver\sqlite Code public static function open(array &$connection_opt