u
This commit is contained in:
@@ -31,6 +31,7 @@ export function sqliteQuery(sql) {
|
||||
if (typeof sql !== 'string') return sql;
|
||||
|
||||
let result = quoteIdentifiers(sql)
|
||||
.replace(/\bWITH\s*\(\s*(?:NOLOCK|UPDLOCK|ROWLOCK|HOLDLOCK|READPAST)(?:\s*,\s*(?:NOLOCK|UPDLOCK|ROWLOCK|HOLDLOCK|READPAST))*\s*\)/gi, '')
|
||||
.replace(/\bISNULL\s*\(/gi, 'IFNULL(')
|
||||
.replace(/\bSYSUTCDATETIME\s*\(\s*\)/gi, "strftime('%Y-%m-%dT%H:%M:%fZ', 'now')")
|
||||
.replace(/\bDATEDIFF_BIG\s*\(\s*second\s*,\s*'1970-01-01'\s*,\s*([^)]+?)\s*\)/gi, "CAST(strftime('%s', $1) AS INTEGER)")
|
||||
|
||||
Reference in New Issue
Block a user