The events that you receive when dealing with live queries.
More...
#include <LiveQueryEvent.hpp>
|
static uint64_t | hash (std::vector< Document > const &documents) |
| Returns a hash that represents the set of matching documents.
|
|
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 documents.
|
|
|
bool | is_initial |
| Returns whether or not this is the initial event for the associated live query.
|
|
std::vector< Document > | old_documents |
| A list of all of the documents that matched the live query as part of the previous update.
|
|
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 inserted.
|
|
std::vector< std::size_t > | deletions |
| A list of the indexes in the list of old matching documents at which previously matching documents have been removed.
|
|
std::vector< std::size_t > | updates |
| A list of the indexes in the list of new matching documents at which already matching documents have been updated.
|
|
std::vector< LiveQueryMove > | moves |
| A list of the move objects that provide the indexes, in relation to the list of old matching documents, that already matching documents have moved from and the indexes, in relation to the list of new matching documents, that the documents have moved to.
|
|
The events that you receive when dealing with live queries.
◆ hash()
uint64_t ditto::LiveQueryEvent::hash |
( |
std::vector< Document > const & |
documents | ) |
|
|
static |
Returns a hash that represents the set of matching documents.
- Parameters
-
[in] | documents | the matching documents delivered alongside the live query event. |
- Returns
- a hash that represents the set of matching documents.
◆ hash_mnemonic()
std::string ditto::LiveQueryEvent::hash_mnemonic |
( |
std::vector< Document > const & |
documents | ) |
|
|
static |
Returns a pattern of words that together create a mnemonic, which represents the set of matching documents.
- Parameters
-
[in] | documents | the matching documents delivered alongside the live query event. |
- Returns
- a pattern of words that together create a mnemonic, which represents the set of matching documents.
◆ is_initial
bool ditto::LiveQueryEvent::is_initial |
Returns whether or not this is the initial event for the associated live query.
This will only be true
for the first event delivered for a given live query.