3. Data Modeling and Sync Logic
Batch Write Transactions
Use a write transaction when you want to combine multiple database operations into a single atomic transaction.
Cross-Collection Operations
The legacy query API methods support atomic operations across collections. For more information, see ditto.store.write
in your language’s API reference.
Cross-collection atomic write transactions are currently unsupported by Ditto Query Language (DQL); development is actively in progress.
Implementing Global Async Transactions
For example, in Swift, use DispatchQueue.global
, as follows:
Swift
Log Message: Transaction Remains Blocked
If you see this message in your Ditto logs, read the Troubleshooting guide for more information about how to debug blocked database transactions.