public function 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/Driver/sqlite/Connection.php, line 376

Class

Connection
SQLite implementation of \Drupal\Core\Database\Connection.

Namespace

Drupal\Core\Database\Driver\sqlite

Code

public function prepareQuery($query) {
  return $this->prepare($this->prefixTables($query));
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Database!Driver!sqlite!Connection.php/function/Connection::prepareQuery/8.1.x