The sqlite3_deserialize() interface was created for this very purpose. https://www.sqlite.org/c3ref/deserialize.html
[1] https://stackoverflow.com/a/53453338/3063 [2] https://www.sqlite.org/loadext.html#example_extensions [3] https://www.sqlite.org/src/file/ext/misc/memvfs.c
Also check https://github.com/lmatteis/torrent-net
$ mount -t tmpfs none /some/path
$ write db.sqlite /some/path/db.sqlite
$ read db.sqlite
We've been abusing tmpfs for more than 10 years to get around the IO layer's failings. It's probably still a valid pattern.Could you talk more about what Pragmas you’ve been using and why?
Ramfs?
https://www.jamescoyle.net/knowledge/951-the-difference-betw...
I'm still remembering old-school ramdisks under Linux which were finite in both number and size, both to quite small extents. I think there were 8 (or 12 or 16?) total ramdisks available, of only 2-4 MB each, configurable with LILO boot options.
That's now ... mostly taking up valuable storage in my own brain for no useful effect.
(A prime validation for answering questions, BTW.)
My first read was that the old-school ramfs / ramdisk limitations still held. I can't actually even find documentation on them, though I'm pretty sure I'm not dreaming this.
Circa 2.0 kernal IIRC, possibly earlier.
OK, some traces remain, see:
https://www.tldp.org/HOWTO/Bootdisk-HOWTO/x1143.html
Note that this is OBSOLETE information.
With the right pragmas it is both faster and more compact than JSON. It is also much more "human readable" than gigabytes of JSON.
I only wish there was a way to open an http-fetched SQLite database from memory so I don't have to write it to disk first.