-
-
Notifications
You must be signed in to change notification settings - Fork 727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asynchronous Database Access Methods #550
Conversation
This guarantees that the asyncWrite method provides exclusive write access for the whole duration of (transaction + result handling).
Yeah @sobri909, it took years of iterations, and the advent of the standard |
@groue I didn't even know this was in the works! Very cool surprise 😄 Also, apologies for being absent for the past many months. My workload has been insane, and drowned out my chances to work on anything else. But I do still read every GRDB email 😂 There's always fun new things turning up! I just never have the time to start using them or work on them. Sigh. I'm keen to have a play with |
Don't worry :-) I'm having a lot of fun, and it's a pleasure to share it 👍 |
This PR adds asynchronous database access methods on DatabaseQueue, Pool, and Snaphot:
asyncWrite
andasyncRead
use the Result type from the Standard Library, and are only available with a Swift 5+ compiler (Xcode 10.2+).I'm worried that
asyncWriteWithoutTransaction
is easier to use than the safer alternativeasyncWrite
. Let's hope the very long name sounds like a warning for the users.Those methods will fuel RxGRDB and GRDBCombine.