LMInstantiator // Set SQLite journal mode == OFF.

This commit is contained in:
ShikiSuen 2024-01-07 17:07:18 +08:00
parent 3cd327eb15
commit 86bab5c7a8
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ public extension vChewingLM {
if dropPreviousConnection { disconnectSQLDB() } if dropPreviousConnection { disconnectSQLDB() }
vCLog("Establishing SQLite connection to: \(dbPath)") vCLog("Establishing SQLite connection to: \(dbPath)")
guard sqlite3_open(dbPath, &Self.ptrSQL) == SQLITE_OK else { return false } guard sqlite3_open(dbPath, &Self.ptrSQL) == SQLITE_OK else { return false }
guard "PRAGMA journal_mode = MEMORY;".runAsSQLExec(dbPointer: &ptrSQL) else { return false } guard "PRAGMA journal_mode = OFF;".runAsSQLExec(dbPointer: &ptrSQL) else { return false }
isSQLDBConnected = true isSQLDBConnected = true
return true return true
} }