summaryrefslogtreecommitdiffstats
path: root/lib/db/adapterpgsql.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/adapterpgsql.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/adapterpgsql.php')
-rw-r--r--lib/db/adapterpgsql.php6
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;
+ }
}