Represents the returned results when executing a DQL query, containing a QueryResultItem for each match. More...
Public Member Functions | |
| size_t | item_count () const |
| QueryResultItem | get_item (size_t index) const |
| Returns the matching QueryResultItem. | |
| std::vector< QueryResultItem > | items () const |
| std::vector< DocumentId > | mutated_document_ids () const |
| IDs of documents that were mutated by the DQL query. Empty array if no documents have been mutated. | |
| std::unique_ptr< uint64_t > | get_commit_id () const |
| The commit ID associated with this query result, if any. | |
Represents the returned results when executing a DQL query, containing a QueryResultItem for each match.
| std::unique_ptr< uint64_t > ditto::QueryResult::get_commit_id | ( | ) | const |
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.
| QueryResultItem ditto::QueryResult::get_item | ( | size_t | index | ) | const |
Returns the matching QueryResultItem.
| std::out_of_range | when index exceeds the number of QueryResultItem. |
| size_t ditto::QueryResult::item_count | ( | ) | const |
Return the number of QueryResultItem available.
| std::vector< QueryResultItem > ditto::QueryResult::items | ( | ) | const |
Return all the available QueryResultItem.
| std::vector< DocumentId > ditto::QueryResult::mutated_document_ids | ( | ) | const |
IDs of documents that were mutated by the DQL query. Empty array if no documents have been mutated.