mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 04:59:15 -06:00
Fix quoting to handle non-string values
This commit is contained in:
parent
b070784b8a
commit
6b863e3b0f
@ -44,15 +44,15 @@ export default class PostgresQuery {
|
|||||||
}
|
}
|
||||||
|
|
||||||
quoteIdentifier(value) {
|
quoteIdentifier(value) {
|
||||||
return '"' + value.replace(/"/g, '""') + '"';
|
return '"' + String(value).replace(/"/g, '""') + '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
quoteLiteral(value) {
|
quoteLiteral(value) {
|
||||||
return "'" + value.replace(/'/g, "''") + "'";
|
return "'" + String(value).replace(/'/g, "''") + "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
escapeLiteral(value) {
|
escapeLiteral(value) {
|
||||||
return value.replace(/'/g, "''");
|
return String(value).replace(/'/g, "''");
|
||||||
}
|
}
|
||||||
|
|
||||||
hasTimeGroup() {
|
hasTimeGroup() {
|
||||||
|
Loading…
Reference in New Issue
Block a user