Skip to content

Commit

Permalink
Enable WAL journal mode for SQLite
Browse files Browse the repository at this point in the history
  • Loading branch information
martpie committed Jan 1, 2025
1 parent 203e986 commit 9a749ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src-tauri/src/plugins/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ async fn setup() -> AnyResult<DB> {
.filename(&database_path)
.create_if_missing(true)
.optimize_on_close(true, None)
.auto_vacuum(ormlite::sqlite::SqliteAutoVacuum::Incremental);
.auto_vacuum(ormlite::sqlite::SqliteAutoVacuum::Incremental)
.journal_mode(ormlite::sqlite::SqliteJournalMode::Wal);

let connection = SqliteConnection::connect_with(&options).await?;

Expand Down

0 comments on commit 9a749ea

Please sign in to comment.