mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-01 22:21:51 +00:00
fix: Allow passing callback as second parameter
This commit is contained in:
2 files changed
+8
-6
No files matched your search
@@ -28,6 +28,8 @@ const parseTypes = (field, next) => {
|
||||
const parseParameters = (query, parameters) => {
|
||||
if (query === undefined) throw new FormatError(`Undefined query passed`);
|
||||
|
||||
if(typeof parameters === 'function') return [query, []];
|
||||
|
||||
if (query.includes('@') || query.includes(':')) return [query, parameters];
|
||||
|
||||
const queryParams = query.match(/\?(?!\?)/g);
|
||||
|
||||
Reference in new issue
Block a user