Ditto 4.6.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ditto::QueryResult Class Reference

Represents the returned results when executing a DQL query, containing a QueryResultItem for each match. More...

#include <QueryResult.hpp>

Public Member Functions

size_t item_count () const
 
QueryResultItem get_item (size_t index) const
 Returns the matching QueryResultItem.
 
std::vector< QueryResultItemitems () const
 
std::vector< DocumentIdmutated_document_ids () const
 IDs of documents that were mutated by the DQL query. Empty array if no documents have been mutated.
 

Detailed Description

Represents the returned results when executing a DQL query, containing a QueryResultItem for each match.

Member Function Documentation

◆ get_item()

QueryResultItem ditto::QueryResult::get_item ( size_t index) const

Returns the matching QueryResultItem.

Exceptions
std::out_of_rangewhen index exceeds the number of QueryResultItem.

◆ item_count()

size_t ditto::QueryResult::item_count ( ) const

Return the number of QueryResultItem available.

◆ items()

std::vector< QueryResultItem > ditto::QueryResult::items ( ) const

Return all the available QueryResultItem.

◆ mutated_document_ids()

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.

‍Important: The returned document IDs are not cached, make sure to call

this method once and keep the return value for as long as needed.