summaryrefslogtreecommitdiffstats
path: root/lib/db/adaptersqlite.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-02-25 22:49:55 +0100
committerBart Visscher <bartv@thisnet.nl>2013-07-21 23:17:37 +0200
commit58991150ab17846640907d43a6d4b0ff502d4986 (patch)
tree68b840c85a9b099872510b6adc6f420273ebbd80 /lib/db/adaptersqlite.php
parent1d5d23a1de5a490595d8bb7ea81b8bda48b8feeb (diff)
downloadnextcloud-server-58991150ab17846640907d43a6d4b0ff502d4986.tar.gz
nextcloud-server-58991150ab17846640907d43a6d4b0ff502d4986.zip
Move query statement fixup handling to Connection wrapper
Diffstat (limited to 'lib/db/adaptersqlite.php')
-rw-r--r--lib/db/adaptersqlite.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/db/adaptersqlite.php b/lib/db/adaptersqlite.php
index 0b8107ac53e..f0057ab489f 100644
--- a/lib/db/adaptersqlite.php
+++ b/lib/db/adaptersqlite.php
@@ -10,4 +10,10 @@
namespace OC\DB;
class AdapterSqlite extends Adapter {
+ public function fixupStatement($statement) {
+ $statement = str_replace( '`', '"', $statement );
+ $statement = str_ireplace( 'NOW()', 'datetime(\'now\')', $statement );
+ $statement = str_ireplace( 'UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement );
+ return $statement;
+ }
}