mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix handling of variable interpolation for IN expresions
This commit is contained in:
parent
21e7b0b92d
commit
da8696ed95
@ -48,7 +48,7 @@ export default class PostgresQuery {
|
||||
}
|
||||
|
||||
quoteLiteral(value) {
|
||||
return "'" + this.escapeLiteral(value) + "'";
|
||||
return "'" + value.replace("'", "''") + "'";
|
||||
}
|
||||
|
||||
escapeLiteral(value) {
|
||||
@ -74,7 +74,7 @@ export default class PostgresQuery {
|
||||
}
|
||||
|
||||
let escapedValues = _.map(value, this.quoteLiteral);
|
||||
return '(' + escapedValues.join(',') + ')';
|
||||
return escapedValues.join(',');
|
||||
}
|
||||
|
||||
render(interpolate?) {
|
||||
|
Loading…
Reference in New Issue
Block a user