Open terrakuh opened 1 year ago
For anyone who's interested: You can apply the dump_and_load.patch.txt patch:
git am < dump_and_load.patch.txt
Basic usage:
db1.dump("main", (err, data) => {
db2.load("main", data, (err) => {})
})
[Uploading Unknown.zip…]()
Summary
Are there any plans to provide functionality to dump/load the SQLite database to/from raw memory buffers? I've seen #709 but I think that issue is obsolete.
This would enable the user to work solely on in-memory database and make backups.
Proposed implementation
I have implemented the experimental methods
db.dump()
anddb.load()
which map to the SQLite equivalentsqlite3_serialize()
andsqlite3_deserialize()
at my fork. It is not 100% complete and does not contain tests.