refactor(utils/parseExecute): allow other methods through prepare calls

This commit is contained in:
Linden committed 2023-07-06 12:52:14 +10:00
1 parent 54deb4ab66
commit 8a340d60e3
1 file changed
+1 -3
+1 -3
View File
@@ -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;
}
};