mirror of
https://github.com/the-draupnir-project/Draupnir.git
synced 2026-08-29 07:08:50 +00:00
Explicitly choose the setting of temp_store in better sqlite.
Memory isn't the default. Co-authored-by: Bea <20361868+enbea@users.noreply.github.com>
This commit is contained in:
@@ -24,7 +24,9 @@ export function makeBetterSqliteDB(
|
||||
): Database {
|
||||
log.info("Opening db: ", options.path);
|
||||
const db = new BetterSqlite3(options.path, options);
|
||||
if (options.path !== ":memory:") {
|
||||
if (options.path === ":memory:") {
|
||||
db.pragma("temp_store = memory");
|
||||
} else {
|
||||
db.pragma("temp_store = file"); // Avoid unnecessary memory usage.
|
||||
}
|
||||
if (options.WALMode) {
|
||||
|
||||
Reference in New Issue
Block a user