mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-01 14:38:50 +00:00
refactor(utils/parseExecute): allow other methods through prepare calls
This commit is contained in:
1 parent
54deb4ab66
commit
8a340d60e3
1 file changed
+1
-3
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user