psanford / sqlite3vfs

Go sqlite3 vfs
MIT License
44 stars 6 forks source link

temporary files cannot diverted #15

Open jtarchie opened 3 weeks ago

jtarchie commented 3 weeks ago

I have the following issue with zstd VFS. I cannot support temporary files as it is read-only.

The workaround is to set PRAGMA temp_store = memory;;

In the following appendvfs implementation, it diverts temporary files to the base file system operations. I cannot implement this with interface for VFS at the moment. It does not provide access to the base VFS.

I don't know what to do, but I want to keep track if anyone experiences this issue.

psanford commented 3 weeks ago

Interesting. We already delegate a few functions to the base vfs implementation. I'd be fine exposing that.

Maybe we do this as a package level function that wraps sqlite3_vfs_find:

VFSFind(name string) VFS

I don't have much time to work on this but I would be open to a PR.