objectbox / objectbox/objectbox-examples

Need more example in Transaction Insert and Query

Open
#44 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
408
Forks
96
PR merge metrics
No merged PRs in 30d

Description

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 ?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the transaction documentation linked in the issue and review the descriptions of runInTx, runInReadTx, runInTxAsync, and callInTx. Add clear transaction insert and query examples, including runInTxAsync, so readers can see how each method is implemented and when it completes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
database, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.