diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-02-25 22:49:55 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-07-21 23:17:37 +0200 |
commit | 58991150ab17846640907d43a6d4b0ff502d4986 (patch) | |
tree | 68b840c85a9b099872510b6adc6f420273ebbd80 /lib/db/adaptersqlite.php | |
parent | 1d5d23a1de5a490595d8bb7ea81b8bda48b8feeb (diff) | |
download | nextcloud-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.php | 6 |
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; + } } |