public function __construct($filename = false) { if (!$filename) { $filename = dirname(__FILE__) . '/palma.db'; } trace("db file = {$filename}"); parent::__construct($filename); // Wait up to 10000 ms when the database is locked. $this->busyTimeout(10000); // Create any missing tables. $this->exec(self::SQL_CREATE_TABLES); }
function __construct($dbPath) { parent::__construct($dbPath, SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE); // Preparing annotation detection $this->isDevMode = true; $this->config = Setup::createAnnotationMetadataConfiguration(array(__DIR__ . "/../../src"), $this->isDevMode); // Creating entity manager $this->conn = array('driver' => 'pdo_sqlite', 'path' => $dbPath); $this->entityManager = EntityManager::create($this->conn, $this->config); // Checking table $this->checkTableCreation(); }
public function __construct($create = false) { $flags = SQLITE3_OPEN_READWRITE; if ($create) { $flags |= SQLITE3_OPEN_CREATE; } parent::__construct(DB_FILE, $flags); $this->enableExceptions(true); // Activer les contraintes des foreign keys $this->exec('PRAGMA foreign_keys = ON;'); $this->createFunction('transliterate_to_ascii', ['Garradin\\Utils', 'transliterateToAscii']); $this->createFunction('base64', 'base64_encode'); $this->createFunction('rank', [$this, 'sql_rank']); }
function __construct($string) { parent::__construct($string); }
function __construct($dbFilename, $flags = SQLITE3_OPEN_READWRITE) { parent::__construct($dbFilename, $flags); }
public function __construct($str_cn = '') { list($type, $path) = explode(':', $str_cn); $this->__par['filename'] = $path; parent::__construct($path); }
function __construct($dbPath) { parent::__construct($dbPath, SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE); }