1#ifndef _DITTO_WRITE_TRANSACTION_PENDING_CURSOR_OPERATION_
2#define _DITTO_WRITE_TRANSACTION_PENDING_CURSOR_OPERATION_
5#include "DocumentId.hpp"
6#include "MutableDocument.hpp"
7#include "SortDirection.hpp"
8#include "UpdateResult.hpp"
9#include "WriteTransaction.hpp"
14#include <unordered_map>
20class DittoHandleWrapper;
37 std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper,
46 std::unique_ptr<Impl> impl_;
102 SortDirection direction);
111 std::vector<Document>
exec()
const;
123 std::unordered_map<DocumentId, std::vector<std::unique_ptr<UpdateResult>>,
125 update(std::function<
void(std::vector<MutableDocument> &)> fn)
const;
133 std::vector<DocumentId>
remove()
const;
141 std::vector<DocumentId>
evict()
const;
ScopedWriteTransaction exposes functionality that allows you to perform multiple operations on the st...
Definition: ScopedWriteTransaction.hpp:23
WriteTransaction exposes functionality that allows you to perform multiple operations on the store wi...
Definition: WriteTransaction.hpp:25
These objects are returned when using find-like functionality on ScopedWriteTransactions....
Definition: WriteTransactionPendingCursorOperation.hpp:27
WriteTransactionPendingCursorOperation & limit(uint32_t limit)
Limit the number of documents that get returned when querying a collection for matching documents.
Definition: WriteTransactionPendingCursorOperation.cpp:81
std::unordered_map< DocumentId, std::vector< std::unique_ptr< UpdateResult > >, DocumentIdHasher > update(std::function< void(std::vector< MutableDocument > &)> fn) const
Update documents that match the query generated by the preceding function chaining.
Definition: WriteTransactionPendingCursorOperation.cpp:101
std::vector< DocumentId > remove() const
Remove all documents that match the query generated by the preceding function chaining.
Definition: WriteTransactionPendingCursorOperation.cpp:118
WriteTransactionPendingCursorOperation & sort(std::string query, SortDirection direction)
Sort the documents that match the query provided in the preceding find-like function call.
Definition: WriteTransactionPendingCursorOperation.cpp:87
std::string query
Definition: WriteTransactionPendingCursorOperation.hpp:59
std::vector< DocumentId > evict() const
Evict all documents that match the query generated by the preceding function chaining.
Definition: WriteTransactionPendingCursorOperation.cpp:130
std::string collection_name
Definition: WriteTransactionPendingCursorOperation.hpp:54
std::vector< Document > exec() const
Execute the query generated by the preceding function chaining and return the list of matching docume...
Definition: WriteTransactionPendingCursorOperation.cpp:93
WriteTransactionPendingCursorOperation & offset(uint32_t offset)
Offset the resulting set of matching documents.
Definition: WriteTransactionPendingCursorOperation.cpp:75
basic_json<> json
default JSON class
Definition: json.hpp:2933