Formatting.

This commit is contained in:
Mike Cao committed 2023-07-28 18:30:02 -07:00
1 parent 200e9b8bfa
commit 0cc289b3cd
2 files changed
+19 -12

No files matched your search

+1
View File
@@ -103,6 +103,7 @@ async function rawQuery(sql: string, data: object): Promise<any> {
if (db !== POSTGRESQL && db !== MYSQL) {
return Promise.reject(new Error('Unknown database.'));
}
const query = sql?.replaceAll(/\{\{\s*(\w+)(::\w+)?\s*}}/g, (...args) => {
const [, name, type] = args;
params.push(data[name]);