Commit 227bf85e by Marcus Efraimsson Committed by GitHub

Merge pull request #13184 from svenklemm/postgres-interval_ms

Fix postgres quoting to handle non-string values
parents 37af10c6 6b863e3b
......@@ -44,15 +44,15 @@ export default class PostgresQuery {
}
quoteIdentifier(value) {
return '"' + value.replace(/"/g, '""') + '"';
return '"' + String(value).replace(/"/g, '""') + '"';
}
quoteLiteral(value) {
return "'" + value.replace(/'/g, "''") + "'";
return "'" + String(value).replace(/'/g, "''") + "'";
}
escapeLiteral(value) {
return value.replace(/'/g, "''");
return String(value).replace(/'/g, "''");
}
hasTimeGroup() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment