Skip to content

DatabaseQueue in WAL mode "enough" for App + Widget? #1516

Answered by groue
gopeter asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @gopeter,

I'm building my first app and trying to wrap my head around the shared database part. To be honest, I don't fully understand all of the parts of the docs.

That's because I'm a poor writer, and because sharing a database is HARD. I'll try to illustrate the Sharing a Database guide from the description of your app.

From my understanding, it should be possible to still use the DatabaseQueue [...] in WAL mode from my widget code, which just reads data from time to time.

Definitely, yes.

The WAL mode allows your widget to open a read-only connection, and read from the database, with very little chance of error, even if the app is toying with it (read/write) at the same time.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gopeter
Comment options

Answer selected by gopeter
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