Ditto 4.13.1
Loading...
Searching...
No Matches
DittoSDK.DittoQueryResult Class Reference

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

Protected Member Functions

override void Dispose (bool disposing)

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.

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.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.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.