Lines Matching defs:sqlite
12 use dokuwiki\plugin\sqlite\SQLiteDB;
18 protected $sqlite;
27 $this->sqlite = new SQLiteDB('struct', DOKU_PLUGIN . 'struct/db/');
30 $this->sqlite->getPdo()->sqliteCreateFunction('STRUCT_JSON', [$this, 'STRUCT_JSON'], -1);
33 $this->sqlite->getPdo()->sqliteCreateFunction('STRUCT_LOOKUP', [$this, 'STRUCT_LOOKUP'], -1);
36 $this->sqlite->getPdo()->sqliteCreateFunction('IS_PUBLISHER', [$this, 'IS_PUBLISHER'], -1);
40 * @param bool $throw throw an Exception when sqlite not available or fails to load
46 if (!$this->sqlite instanceof SQLiteDB) {
48 if ($throw || defined('DOKU_UNITTEST')) throw new StructException('no sqlite');
60 return $this->sqlite;
70 if (!$this->sqlite) return;
71 $file = $this->sqlite->getDbFile();
75 $this->sqlite = null;