- Notifications
You must be signed in to change notification settings - Fork83
Description
As usual...it depends.
The primary reason wa-sqlite was created was to experiment with different APIs and ideas for SQLite storage. The example VFS classes were written to try a variety of approaches to see what works, what doesn't, and where to go next. Definitely not all but also perhaps not any may be well-suited for your application. You're welcome to use one but modifying an example VFS or writing your own to fit your requirements may be better, and that's really the spirit of the project.
One result of this project is there is no ideal VFS across all applications. All the sample VFS classes have their own strengths and weaknesses. There is a table comparing sample VFS featureshere, and there is a lot more information on VFS trade-offs in theIdeas discussion category.
If I were forced to choose only one VFS for all browser applications, I would first grumble a lot and then grudgingly choose IDBBatchAtomicVFS. Its excellent compatibility across browsers and context types (Window, Worker, shared worker, service worker, extension) make it a solid general purpose choice.
It isn't at all difficult to switch from one VFS to another during development (i.e. as long as converting an existing database is not needed). For example, in the hello demo the VFS isspecified with a single line of code (adding non-default VFS options would be slightly more involved). Comparing different VFS classes with your application is a great way to determine which one is "best" for you.