__construct

  1. drupal
    1. drupal7
Versionen
drupal7 public DatabaseConnection_sqlite::__construct(array $connection_options = array())

Verwandte Themen

Code

includes/database/sqlite/database.inc, line 21

<?php
public function __construct(array $connection_options = array()) {
  // We don't need a specific PDOStatement class here, we simulate it below.
  $this->statementClass = NULL;

  // This driver defaults to transaction support, except if explicitly passed FALSE.
  $this->transactionSupport = !isset($connection_options['transactions']) || $connection_options['transactions'] !== FALSE;

  parent::__construct('sqlite:' . $connection_options['database'], '', '', array(
      // Force column names to lower case.
      PDO::ATTR_CASE => PDO::CASE_LOWER,
    ));

  $this->exec('PRAGMA encoding="UTF-8"');

  // Create functions needed by SQLite.
  $this->sqliteCreateFunction('if', array($this, 'sqlFunctionIf'));
  $this->sqliteCreateFunction('greatest', array($this, 'sqlFunctionGreatest'));
  $this->sqliteCreateFunction('pow', 'pow', 2);
  $this->sqliteCreateFunction('length', 'strlen', 1);
  $this->sqliteCreateFunction('concat', array($this, 'sqlFunctionConcat'));
  $this->sqliteCreateFunction('substring', array($this, 'sqlFunctionSubstring'), 3);
  $this->sqliteCreateFunction('rand', array($this, 'sqlFunctionRand'));
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen