Skip to content

Commit

Permalink
Updated duckdb-rs and rusqlite
Browse files Browse the repository at this point in the history
- Updated duckdb-rs to v0.10.1 to include the fix for duckdb/duckdb-sqlite#82
- Added JOURNAL_MODE 'WAL' when DuckDB attaches the SQLite database as documented in duckdb/duckdb-sqlite#83
- These two changes, however, did not seem to fix the concurrency errors documented in duckdb/duckdb-sqlite#82
  • Loading branch information
Colin Breck committed Mar 22, 2024
1 parent 0949e09 commit cc564ee
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
29 changes: 19 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ version = "0.1.0"
edition = "2021"

[dependencies]
rusqlite = { version = "0.30.0", features = ["bundled", "limits"] }
duckdb = { version = "0.9.2", features = ["bundled"]}
rusqlite = { version = "0.31.0", features = ["bundled", "limits"] }
duckdb = { version = "0.10.1", features = ["bundled"]}
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ mod tests {
// Attach to the SQLite DB
conn.execute_batch("
INSTALL sqlite;
ATTACH './db/sqlite_writer_duckdb_reader_with_wal.db' AS sqlite_db (TYPE SQLITE, READ_ONLY);
ATTACH './db/sqlite_writer_duckdb_reader_with_wal.db' AS sqlite_db (TYPE SQLITE, READ_ONLY, JOURNAL_MODE 'WAL');
").unwrap();

// Count the rows
Expand Down Expand Up @@ -356,7 +356,7 @@ mod tests {
conn.execute_batch(
"
INSTALL sqlite;
ATTACH './db/duckdb_writer_duckdb_reader_with_wal.db' AS sqlite_db (TYPE SQLITE);
ATTACH './db/duckdb_writer_duckdb_reader_with_wal.db' AS sqlite_db (TYPE SQLITE, JOURNAL_MODE 'WAL');
",
)
.unwrap();
Expand Down Expand Up @@ -386,7 +386,7 @@ mod tests {
// Attach to the SQLite DB
conn.execute_batch("
INSTALL sqlite;
ATTACH './db/duckdb_writer_duckdb_reader_with_wal.db' AS sqlite_db (TYPE SQLITE, READ_ONLY);
ATTACH './db/duckdb_writer_duckdb_reader_with_wal.db' AS sqlite_db (TYPE SQLITE, READ_ONLY, JOURNAL_MODE 'WAL');
").unwrap();

// Count the rows
Expand Down

0 comments on commit cc564ee

Please sign in to comment.