1#ifndef DITTO_LIVE_QUERY_EVENT_H
2#define DITTO_LIVE_QUERY_EVENT_H
5#include "LiveQueryMove.hpp"
18class DITTO_DEPRECATED_BECAUSE(
19 "Use DQL (Ditto Query Language) instead. For more information see: "
20 "https://ditto.com/link/legacy-to-dql-guide") LiveQueryEvent {
21 DITTO_DISABLE_DEPRECATED_WARNINGS(
"The legacy query API is deprecated")
23 friend class LiveQuery;
29 std::vector<std::size_t>
updates,
30 std::vector<LiveQueryMove>
moves);
72 std::vector<LiveQueryMove>
moves;
81 static uint64_t
hash(std::vector<Document>
const &documents);
92 static std::string
hash_mnemonic(std::vector<Document>
const &documents);
94 DITTO_REENABLE_WARNINGS
static uint64_t hash(std::vector< Document > const &documents)
Returns a hash that represents the set of matching documents.
std::vector< Document > old_documents
A list of all of the documents that matched the live query as part of the previous update.
Definition LiveQueryEvent.hpp:46
static std::string hash_mnemonic(std::vector< Document > const &documents)
Returns a pattern of words that together create a mnemonic, which represents the set of matching docu...
std::vector< std::size_t > updates
A list of the indexes in the list of new matching documents at which already matching documents have ...
Definition LiveQueryEvent.hpp:64
std::vector< std::size_t > deletions
A list of the indexes in the list of old matching documents at which previously matching documents ha...
Definition LiveQueryEvent.hpp:58
bool is_initial
Returns whether or not this is the initial event for the associated live query.
Definition LiveQueryEvent.hpp:40
std::vector< LiveQueryMove > moves
A list of the move objects that provide the indexes, in relation to the list of old matching document...
Definition LiveQueryEvent.hpp:72
std::vector< std::size_t > insertions
A list of the indexes in the list of new matching documents at which new matching documents have been...
Definition LiveQueryEvent.hpp:52
Namespace for the Ditto C++ SDK types and functions.
Definition AbstractDocumentPath.hpp:19