Skip to content

Need more example in Transaction Insert and Query #476

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

Closed
GulajavaMinistudio opened this issue Jun 16, 2018 · 1 comment
Closed

Need more example in Transaction Insert and Query #476

GulajavaMinistudio opened this issue Jun 16, 2018 · 1 comment

Comments

@GulajavaMinistudio
Copy link

From this documentation, there are several transaction in ObjectBox
http://objectbox.io/documentation/transactions/

The class BoxStore offers the following methods to perform explicit transactions:
runInTx: Runs the given runnable inside a transaction.
runInReadTx: Runs the given runnable inside a read(-only) transaction. Unlike write transactions, multiple read transactions can run at the same time.
runInTxAsync: Runs the given Runnable as a transaction in a separate thread. Once the transaction completes the given callback is called (callback may be null).
callInTx: Like runInTx(Runnable), but allows returning a value and throwing an exception.

But I found little confused for runInTxAsync implementation. Any good example about how to implementation those transaction ?

@greenrobot-team
Copy link
Member

Closing in favor of objectbox/objectbox-examples#44 -ut

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants