Commit 6b863e3b by Sven Klemm

Fix quoting to handle non-string values

parent b070784b
......@@ -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