summaryrefslogtreecommitdiff
path: root/db.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-11-19 13:03:36 +0300
committerAndrew Dolgov <[email protected]>2017-11-19 13:03:36 +0300
commitdfee22901d7c5defc61ef16e831d7c4a8f05ffd1 (patch)
tree19c70fcf048284decccfa9388e374047b04b14d4 /db.php
parent41e97ceb2c0e7b36ebb273707f12d2d940c87085 (diff)
* use PDO::sqlite
* remove database-backed sessions (too slow for sqlite)
Diffstat (limited to 'db.php')
-rw-r--r--db.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/db.php b/db.php
index 5c94ecb..ad74639 100644
--- a/db.php
+++ b/db.php
@@ -4,9 +4,9 @@ class Db {
private $dbh;
private function __construct() {
- $this->dbh = new SQLite3(SCRATCH_DB);
- $this->dbh->busyTimeout(30*1000);
- $this->dbh->exec('PRAGMA journal_mode = wal;');
+ $this->dbh = new PDO('sqlite:' . SCRATCH_DB);
+ //$this->dbh->busyTimeout(30*1000);
+ $this->dbh->query('PRAGMA journal_mode = wal;');
}
public static function get() {