Browse Source

fix: binding for VitessClient

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/7164/head
mertmit 1 year ago
parent
commit
6002b191ff
  1. 6
      packages/nocodb/src/db/sql-client/lib/mysql/VitessClient.ts

6
packages/nocodb/src/db/sql-client/lib/mysql/VitessClient.ts

@ -131,7 +131,8 @@ class Vitess extends MysqlClient {
args.databaseName = this.connectionConfig.connection.database;
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) {
@ -209,7 +210,8 @@ class Vitess extends MysqlClient {
try {
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) {

Loading…
Cancel
Save