Ditto 5.0.0
Loading...
Searching...
No Matches
DittoSDK.Store.DittoQueryResult Class Reference

Represents the result of executing a DQL query. More...

Inheritance diagram for DittoSDK.Store.DittoQueryResult:
DittoSDK.Internal.Drop

Protected Member Functions

override void Dispose (bool disposing)
Protected Member Functions inherited from DittoSDK.Internal.Drop
void Dispose (bool disposing)
 Overload for types to dispose of resources, regardless of whether the type is being disposed or finalized. Note that finalization occurs on a dedicated thread.

Properties

List< DittoQueryResultItemItems [get]
 Gets the individual items matching a DQL query.
List< DittoDocumentIdMutatedDocumentIds [get]
 Gets the IDs of documents that were mutated locally by a mutating DQL query passed to DittoStore.ExecuteAsync. Empty array if no documents have been mutated.
ulong? CommitID [get]
 Gets the commit ID associated with this query result, if any.
Properties inherited from DittoSDK.Internal.Drop
bool IsDisposed [get]

Additional Inherited Members

Public Member Functions inherited from DittoSDK.Internal.Drop
void Dispose ()
 Suppresses finalization and initiates custom disposal logic.

Detailed Description

Represents the result of executing a DQL query.

Note
More info such as metrics will be provided in the near future.

Property Documentation

◆ CommitID

ulong? DittoSDK.Store.DittoQueryResult.CommitID
get

Gets the commit ID associated with this query result, if any.

This ID uniquely identifies the commit in which this change was accepted into the local store. The commit ID is available for all query results involving insertions, updates, or deletions. This ID can be used to track whether a local change has been synced to other peers.

For write transactions, the commit ID is only available after the transaction has been successfully committed. Queries executed within an uncommitted transaction will not have a commit ID.

◆ MutatedDocumentIds

List<DittoDocumentId> DittoSDK.Store.DittoQueryResult.MutatedDocumentIds
get

Gets the IDs of documents that were mutated locally by a mutating DQL query passed to DittoStore.ExecuteAsync. Empty array if no documents have been mutated.

Note
A DittoStoreObserver can only be registered with a SELECT query, which is non-mutating, and thus the query result passed to the storeObservationHandler always returns an empty array in that case.
Attention
The returned document IDs are not cached, make sure to call this method once and keep the return value for as long as needed.