From 80f6d91b7019462eb5dd7bcfa1dbeff5b2229775 Mon Sep 17 00:00:00 2001 From: "Visal .In" Date: Sun, 8 Dec 2024 20:19:05 +0700 Subject: [PATCH] use QUERY instead of EXECUTE for mysql to support USE statement --- electron/drivers/mysql.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electron/drivers/mysql.ts b/electron/drivers/mysql.ts index 4a47713..3330af3 100644 --- a/electron/drivers/mysql.ts +++ b/electron/drivers/mysql.ts @@ -151,7 +151,7 @@ export default class MySQLDriver implements BaseDriver { conn: Pool | PoolConnection, statement: string, ): Promise { - const [result, fieldsets] = await conn.execute(statement); + const [result, fieldsets] = await conn.query(statement); // If it is not an array, it means // it is not a SELECT statement