I have an in-memory sqlite database which I want to convert to a simple blob, and I want to do this preferably without using any serialization library.
I also use sqlite api backup calls to serialize it to disk, can this also be used for my purpose?
Or, is it possible to simply copy the database from memory to a char array in any other way? (Development is done using C++)
解决方案
SQLite does not give you direct access to the internal storage of an in-memory database.
You could implement your own VFS to create a 'file' interface for a blob, but just going through a (temporary) disk file sounds much easier.