This commit is contained in:
seb
2026-10-25 15:46:58 +01:00
parent c6171a1d90
commit 6b6c473f9d
19 changed files with 597 additions and 108 deletions

View File

@@ -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)")