libstore: add SQLite::Settings struct for explicit configuration
Progress on #5638 Replace the SQLite constructor's mode parameter with a Settings struct that includes both the open mode and useWAL flag. This makes the dependency on useSQLiteWAL explicit at call sites rather than having it read from the global settings inside the constructor. All call sites now explicitly pass settings.useSQLiteWAL, preparing for downstream work where stores can pass their own settings instead of relying on the global.
This commit is contained in:
@@ -75,7 +75,7 @@ struct AttrDb
|
||||
|
||||
auto dbPath = cacheDir / (fingerprint.to_string(HashFormat::Base16, false) + ".sqlite");
|
||||
|
||||
state->db = SQLite(dbPath);
|
||||
state->db = SQLite(dbPath, {.useWAL = settings.useSQLiteWAL});
|
||||
state->db.isCache();
|
||||
state->db.exec(schema);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user