|
|
@ -131,7 +131,8 @@ class Vitess extends MysqlClient { |
|
|
|
args.databaseName = this.connectionConfig.connection.database; |
|
|
|
args.databaseName = this.connectionConfig.connection.database; |
|
|
|
|
|
|
|
|
|
|
|
const response = await this.sqlClient.raw( |
|
|
|
const response = await this.sqlClient.raw( |
|
|
|
`select *, table_name as tn from information_schema.columns where table_name = '${args.tn}' ORDER by ordinal_position`, |
|
|
|
`select *, table_name as tn from information_schema.columns where table_name = ?? ORDER by ordinal_position`, |
|
|
|
|
|
|
|
[args.tn], |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
if (response.length === 2) { |
|
|
|
if (response.length === 2) { |
|
|
@ -209,7 +210,8 @@ class Vitess extends MysqlClient { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
const response = await this.sqlClient.raw( |
|
|
|
const response = await this.sqlClient.raw( |
|
|
|
`select *, TABLE_NAME as tn from INFORMATION_SCHEMA.KEY_COLUMN_USAGE where TABLE_NAME = '${args.tn}' ORDER by ordinal_position;`, |
|
|
|
`select *, TABLE_NAME as tn from INFORMATION_SCHEMA.KEY_COLUMN_USAGE where TABLE_NAME = ? ORDER by ordinal_position;`, |
|
|
|
|
|
|
|
[args.tn], |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
if (response.length === 2) { |
|
|
|
if (response.length === 2) { |
|
|
|