Can the resulting .sqlite3 file of a in-memory database be read somehow?
Imagine a simple http server that gets sent some sql. The server then executes the sql and sends back the resulting .sqlite3 file. My idea of doing something similar like that, would be to create a in memory database, execute the sql there (no problem so far), and then send back the resulting .sqlite3 file.
However i have found no way of doing this. I've even looked for some function in sqlite3, that might return the binary data associated with a .sqlite3 file, however i have found not anything, except this , which sadly does not help at all.
Sounds like you want to use serialize.
https://www.sqlite.org/c3ref/serialize.html
rqlite makes use of the call, from Go.
https://github.com/rqlite/rqlite/blob/db5946f296594aee52c84e2606046560b0f32ed5/db/db.go#L662
@bit-burger Does this resolve your question?