summaryrefslogtreecommitdiff
path: root/db.php
diff options
context:
space:
mode:
Diffstat (limited to 'db.php')
-rw-r--r--db.php26
1 files changed, 0 insertions, 26 deletions
diff --git a/db.php b/db.php
deleted file mode 100644
index 6e28a91..0000000
--- a/db.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-class Db {
- private static $instance;
- private $dbh;
-
- private function __construct() {
- try {
- $this->dbh = new PDO('sqlite:' . SCRATCH_DB);
- } catch (Exception $e) {
- die("Unable to initialize database driver (SQLite): $e");
- }
- //$this->dbh->busyTimeout(30*1000);
- $this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- $this->dbh->query('PRAGMA journal_mode = wal;');
- }
-
- public static function get() {
- if (self::$instance == null)
- self::$instance = new self();
-
- return self::$instance->dbh;
- }
-
-};
-
-?>