launchbadge / sqlx

🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite.
Apache License 2.0
12.34k stars 1.17k forks source link

[SQLite] Expose sqlite3_serialize and sqlite3_deserialize #192

Open mehcode opened 4 years ago

mehcode commented 4 years ago

https://www.sqlite.org/c3ref/serialize.html

https://www.sqlite.org/c3ref/deserialize.html

Ciantic commented 2 weeks ago

My use case is following: Consider GPG encrypted SQLite file e.g. mydatabase.sqlite.gpg

I will open it with GPG and pass the bytestream to sqlite3_deserialize to open the database in-memory. After I'm done with modifications I will use sqlite3_serialize get the bytestream, and GPG encrypt it back to disk.

Without deserialize/serialize support one must first unencrypt the file to disk, and it's not very secure.