From 8a340d60e37b2ad532efee03575b4befc1c55d30 Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Thu, 6 Jul 2023 12:52:14 +1000 Subject: [PATCH] refactor(utils/parseExecute): allow other methods through prepare calls --- src/utils/parseExecute.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/utils/parseExecute.ts b/src/utils/parseExecute.ts index a03535e..42fe1a0 100644 --- a/src/utils/parseExecute.ts +++ b/src/utils/parseExecute.ts @@ -2,8 +2,6 @@ import { CFXParameters } from '../types'; export const executeType = (query: string) => { switch (query.substring(0, query.indexOf(' '))) { - case 'SELECT': - return null; case 'INSERT': return 'insert'; case 'UPDATE': @@ -11,7 +9,7 @@ export const executeType = (query: string) => { case 'DELETE': return 'update'; default: - throw new Error(`Prepared statements only accept SELECT, INSERT, UPDATE, and DELETE methods.`); + return null; } };