Lines Matching defs:sqlite
14 protected $sqlite;
29 /** @var helper_plugin_sqlite $sqlite */
30 $this->sqlite = plugin_load('helper', 'sqlite');
31 if(!$this->sqlite) {
32 if(defined('DOKU_UNITTEST')) throw new \Exception('Couldn\'t load sqlite.');
36 if($this->sqlite->getAdapter()->getName() != DOKU_EXT_PDO) {
37 if(defined('DOKU_UNITTEST')) throw new \Exception('Couldn\'t load PDO sqlite.');
38 $this->sqlite = null;
41 $this->sqlite->getAdapter()->setUseNativeAlter(true);
44 if(!$this->sqlite->init('b3p', DOKU_PLUGIN . 'bez/db/')) {
45 if(defined('DOKU_UNITTEST')) throw new \Exception('Couldn\'t init sqlite.');
46 $this->sqlite = null;
54 * @param bool $throw throw an Exception when sqlite not available?
60 if ($this->sqlite && $conf['metadir'] != substr($this->sqlite->getAdapter()->getDbFile(),0,$len)) {
63 if(!$this->sqlite && $throw) {
64 throw new \Exception('no sqlite');
66 return $this->sqlite;
75 if(!$this->sqlite) return;
76 $file = $this->sqlite->getAdapter()->getDbFile();