Skip to content

Proper init for IDBBatchAtomicVFS #50

Answered by rhashimoto
steida asked this question in Q&A
Discussion options

You must be logged in to vote

It looks fine to me. The default journal_mode is delete, so that PRAGMA isn't necessary unless it's a placeholder to try a different setting later.

The default open flags are CREATE | READWRITE so if you don't really need URI then you could just pass undefined. Adding URI doesn't hurt anything but you might not need it - the reasons to use it are to pass extra parameters to the VFS (which IDBBatchAtomic doesn't use) and that it enables passing a URI to ATTACH DATABASE statements, which can be handy if you need it, e.g. to attach another database read-only, with a non-default VFS, or with VFS-specific parameters.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by steida
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants