I need to load/save SQLite database in memory buffer. For this, I want embed the memvfs extension into sqlite3 code and compile it wholly as sqlite3.dll.
How do it?
Update1:
I want use the memvfs as temp memory buffer. My program load data from net to buffer, connect to this memory buffer and restore data into empty in-memory db. I thoutgh that inclusion of memvfs to sqlite amalgamation would improve perfomance.
Update2:
If you want to use memvfs extension pay attention to bug in readme comment in source. Use "PRAGMA journal_mode=OFF" instead "journal_mode=NONE"
Update3:
Another bug in memvfs.c - use 'max' instead 'maxsz' for maxsz param in URI. The sqlite developers carefully set a rakes :(
Test program to demonstrate using memvfs:
Usage:
Same workflow if you compile it directly into your program instead of using a loadable module; you just have to call
sqlite3_memvfs_init()
with the right arguments instead of usingsqlite3_load_extension()
.