Rusqlite Snapshot Testing

 cljoly/rusqlite-snapshot-testing ...

Rusqlite Changelog

Release notes for the rusqlite_migration library. Version 2.4.1 Documentation Attempt to fix the docs.rs build which started failing in 2.4.0. Dependencies Update some dev dependencies, see git history for details. Version 2.4.0 Dependencies Rusqlite was updated from 0.37.0 to 0.38.0. Please see the release notes for 0.38.0, there are a few breaking changes in this one. Update other dev dependencies, see git history for details. Features Rusqlite 0.38 makes the cache statement optional. This feature was used for foreign key checks. The rusqlite_migration library does not enable any features from rusqlite, not even the default one. This way, downstream users can freely chose which feature to enable based on their needs. As a result, rusqlite_migration now handles statement caching for foreign key checks internally now. As side benefit, this also makes caching more efficient: the prepared statement is kept for the minimum time where it is needed and freed immediately, without taking space in the global cache used by rusqlite. ...

Rusqlite Migration

 cljoly/rusqlite_migration ...

SQLite Pragma Cheatsheet for Performance and Consistency

⚡ TL;DR When Opening the DB PRAGMA journal_mode = wal; -- different implementation of the atomicity properties PRAGMA synchronous = normal; -- synchronise less often to the filesystem PRAGMA foreign_keys = on; -- check foreign key reference, slightly worst performance And check user_version to apply any migrations, for instance with this Rust library. When Closing the DB PRAGMA analysis_limit=400; -- make sure pragma optimize does not take too long PRAGMA optimize; -- gather statistics to improve query optimization Introduction SQL pragma are statements (like SELECT … or CREATE TABLE …) that change the database behaviors or call a special functions. This post is a short list of SQLite pragma I use in my projects built on SQLite, to get better performance and more consistency. ...

May 7, 2021 · 6 min