1#ifndef _DITTO_LIVE_QUERY_EVENT_
2#define _DITTO_LIVE_QUERY_EVENT_
5#include "LiveQueryMove.hpp"
22 std::vector<std::size_t>
updates,
23 std::vector<LiveQueryMove>
moves);
65 std::vector<LiveQueryMove>
moves;
74 static uint64_t
hash(std::vector<Document>
const &documents);
85 static std::string
hash_mnemonic(std::vector<Document>
const &documents);
The events that you receive when dealing with live queries.
Definition LiveQueryEvent.hpp:15
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:39
static uint64_t hash(std::vector< Document > const &documents)
Returns a hash that represents the set of matching documents.
Definition LiveQueryEvent.cpp:23
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:57
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:51
bool is_initial
Returns whether or not this is the initial event for the associated live query.
Definition LiveQueryEvent.hpp:33
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...
Definition LiveQueryEvent.cpp:28
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:65
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:45
The type that is returned when calling observe_local. It handles the logic for calling the event hand...
Definition LiveQuery.hpp:103