mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
return values quotes for suggestions in where expression
This commit is contained in:
parent
9e05477558
commit
731c7520b3
@ -39,11 +39,10 @@ export class PostgresQueryBuilder {
|
||||
}
|
||||
|
||||
buildValueQuery(column: string) {
|
||||
var query = "SELECT DISTINCT " + this.queryModel.quoteIdentifier(column) + "::text";
|
||||
var query = "SELECT DISTINCT quote_literal(" + column + ")";
|
||||
query += " FROM " + this.queryModel.quoteIdentifier(this.target.schema);
|
||||
query += "." + this.queryModel.quoteIdentifier(this.target.table);
|
||||
query += " ORDER BY " + this.queryModel.quoteIdentifier(column);
|
||||
query += " LIMIT 100";
|
||||
query += " ORDER BY 1 LIMIT 100";
|
||||
return query;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user