Fixed query.
This commit is contained in:
1 parent
7764f0ee26
commit
7ec84ae7ea
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -151,7 +151,7 @@ async function rawQuery(sql: string, data: object): Promise<any> {
|
||||
return Promise.reject(new Error('Unknown database.'));
|
||||
}
|
||||
|
||||
const query = sql?.replaceAll(/\{\{(\w+)(::\w+)?}}/g, (...args) => {
|
||||
const query = sql?.replaceAll(/\{\{\s*(\w+)(::\w+)?\s*}}/g, (...args) => {
|
||||
const [, name, type] = args;
|
||||
|
||||
params.push(data[name]);
|
||||
|
||||
Reference in new issue
Block a user