You are here

public function DatabaseConnection_sqlite::PDOPrepare in Drupal 7

NEVER CALL THIS FUNCTION: YOU MIGHT DEADLOCK YOUR PHP PROCESS.

This is a wrapper around the parent PDO::prepare method. However, as the PDO SQLite driver only closes SELECT statements when the PDOStatement destructor is called and SQLite does not allow data change (INSERT, UPDATE etc) on a table which has open SELECT statements, you should never call this function and keep a PDOStatement object alive as that can lead to a deadlock. This really, really should be private, but as DatabaseStatement_sqlite needs to call it, we have no other choice but to expose this function to the world.

File

includes/database/sqlite/database.inc, line 261
Database interface code for SQLite embedded database engine.

Class

DatabaseConnection_sqlite
Specific SQLite implementation of DatabaseConnection.

Code

public function PDOPrepare($query, array $options = array()) {
  return $this->connection
    ->prepare($query, $options);
}