]> git.nbdom.net Git - nb.git/commitdiff
owncloud
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 1 Sep 2016 14:45:59 +0000 (16:45 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 1 Sep 2016 14:45:59 +0000 (16:45 +0200)
etc/dbs.yaml
lib/php/db.php
lib/php/db/types/sqlite.php

index 7ad22ea58554b6f92d4e9ff592f9a00378ded817..defbc91e082476629b5b13a06d534887bef6a3a6 100644 (file)
@@ -50,5 +50,7 @@ postfix:
 
 owncloud:
   host: /home/owncloud/data/owncloud.db
+  #host: /dev/shm/owncloud.db
+  #host: /opt/owncloud/data/owncloud.db
   type: sqlite
   default_table: oc_users
index 757553dbfaa105f429efd73ab0928ea01ef3bdaa..93f494a335410c29e37ec916330daf376c4d8d74 100644 (file)
@@ -137,6 +137,7 @@ class Db extends nb {
 
        function disconnect() {
     if (empty($this->conn)) return null;
+    #$this->conn->exec('COMMIT');
     return $this->conn->close();
   }
 
@@ -175,6 +176,7 @@ class Db extends nb {
     foreach ($this->sql_exec() as $s) {
       $this->conn->exec($s);
     }
+    #$this->conn->exec('BEGIN');
 
     # Create functions
     if ($this->type('sqliteCreateFunction')) {
index 7d05b36974449234e1ff77a06ae05a95dbed7081..56d6117e58f6a6a8aacaae216b28c7770b443330 100644 (file)
@@ -4,7 +4,14 @@ if (!class_exists('Db')) {
        exit;
 }
 $DB_TYPES['sqlite'] = array (
-'exec' => 'PRAGMA encoding = "'.strtoupper(Db::$encoding).'"', 
+'exec' => [
+  'PRAGMA encoding = "'.strtoupper(Db::$encoding).'"', 
+  #'PRAGMA temp_store = 2',
+  #'PRAGMA read_uncommitted = false',
+  #'PRAGMA journal_mode = WAL',
+  #'PRAGMA journal_mode = MEMORY',
+  #'PRAGMA journal_mode = OFF',
+],
 'use_path' => true,
 'extra_where' => 'denorm',