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/adapterpgsql.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/adapterpgsql.php')
-rw-r--r-- | lib/db/adapterpgsql.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/db/adapterpgsql.php b/lib/db/adapterpgsql.php index 0084aad470e..acfc4201629 100644 --- a/lib/db/adapterpgsql.php +++ b/lib/db/adapterpgsql.php @@ -13,4 +13,10 @@ class AdapterPgSql extends Adapter { public function lastInsertId($table) { return $this->conn->fetchColumn('SELECT lastval()'); } + + public function fixupStatement($statement) { + $statement = str_replace( '`', '"', $statement ); + $statement = str_ireplace( 'UNIX_TIMESTAMP()', 'cast(extract(epoch from current_timestamp) as integer)', $statement ); + return $statement; + } } |