Skip to content

Commit

Permalink
fix: binding for VitessClient
Browse files Browse the repository at this point in the history
Signed-off-by: mertmit <mertmit99@gmail.com>
  • Loading branch information
mertmit committed Dec 5, 2023
1 parent 4ed768c commit 6002b19
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/nocodb/src/db/sql-client/lib/mysql/VitessClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 6002b19

Please sign in to comment.