1<?php
2/**
3 * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
4 * @author     Brend Wanders <b.wanders@utwente.nl>
5 */
6// must be run within Dokuwiki
7if(!defined('DOKU_INC')) die('Meh.');
8
9require_once(DOKU_PLUGIN.'strata/driver/driver.php');
10
11/**
12 * The base class for database drivers.
13 */
14class plugin_strata_driver_sqlite extends plugin_strata_driver {
15    public function ci($val='?') {
16        return "$val COLLATE NOCASE";
17    }
18
19    public function isInitialized() {
20        return $this->_db->query("SELECT count(*) FROM sqlite_master WHERE name = 'data'")->fetchColumn() != 0;
21    }
22}
23