mirror of
https://github.com/grafana/grafana.git
synced 2025-09-25 21:23:48 +08:00
Use buildTableConstraint instead of buildSchemaConstraint to find the datatype of a column if using a table from a different database schema
This commit is contained in:
@ -151,8 +151,7 @@ table_schema IN (
|
|||||||
|
|
||||||
buildDatatypeQuery(column: string) {
|
buildDatatypeQuery(column: string) {
|
||||||
let query = 'SELECT udt_name FROM information_schema.columns WHERE ';
|
let query = 'SELECT udt_name FROM information_schema.columns WHERE ';
|
||||||
query += this.buildSchemaConstraint();
|
query += this.buildTableConstraint(this.target.table);
|
||||||
query += ' AND table_name = ' + this.quoteIdentAsLiteral(this.target.table);
|
|
||||||
query += ' AND column_name = ' + this.quoteIdentAsLiteral(column);
|
query += ' AND column_name = ' + this.quoteIdentAsLiteral(column);
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user