Ditto 4.11.0
 
Loading...
Searching...
No Matches
DittoSDK.DittoTransaction Class Reference

Represents a transaction in the Ditto store. More...

Inheritance diagram for DittoSDK.DittoTransaction:
DittoSDK.IDittoQueryExecuting

Public Member Functions

Task< DittoQueryResultExecuteAsync (string query, Dictionary< string, object > arguments=null)
 Executes a DQL query and returns matching items as a query result.This method only returns results from the local store without waiting for any DittoSyncSubscription to catch up with the latest changes. Only use this method if your program must proceed with immediate results. Use a DittoStoreObserver to receive updates to query results as soon as they have been synced to this peer.
 

Protected Member Functions

override unsafe void Dispose (bool disposing)
 

Properties

DittoTransactionInfo Info [get]
 Provides information about the current transaction.
 
DittoStore Store [get]
 The store this transaction belongs to.
 

Detailed Description

Represents a transaction in the Ditto store.

A DittoTransaction is used to group multiple operations into a single atomic unit. This ensures that either all operations within the transaction are applied, or none of them are, maintaining the integrity of the data.

Please consult the documentation of DittoStore.TransactionAsync for more information on how to create and use transactions. For a complete guide on transactions, please refer to the Ditto documentation

.

See also
DittoStore.TransactionAsync

Member Function Documentation

◆ ExecuteAsync()

Task< DittoQueryResult > DittoSDK.DittoTransaction.ExecuteAsync ( string query,
Dictionary< string, object > arguments = null )
inline

Executes a DQL query and returns matching items as a query result.This method only returns results from the local store without waiting for any DittoSyncSubscription to catch up with the latest changes. Only use this method if your program must proceed with immediate results. Use a DittoStoreObserver to receive updates to query results as soon as they have been synced to this peer.

Implements DittoSDK.IDittoQueryExecuting.