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>
18class DittoHandleWrapper;
35 std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper,
44 std::unique_ptr<Impl> impl_;
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:25
WriteTransactionPendingCursorOperation & limit(uint32_t limit)
Limit the number of documents that get returned when querying a collection for matching documents.
Definition WriteTransactionPendingCursorOperation.cpp:68
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:88
std::vector< DocumentId > remove() const
Remove all documents that match the query generated by the preceding function chaining.
Definition WriteTransactionPendingCursorOperation.cpp:105
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:74
std::string query
Definition WriteTransactionPendingCursorOperation.hpp:57
std::vector< DocumentId > evict() const
Evict all documents that match the query generated by the preceding function chaining.
Definition WriteTransactionPendingCursorOperation.cpp:117
std::string collection_name
Definition WriteTransactionPendingCursorOperation.hpp:52
std::vector< Document > exec() const
Execute the query generated by the preceding function chaining and return the list of matching docume...
Definition WriteTransactionPendingCursorOperation.cpp:80
WriteTransactionPendingCursorOperation & offset(uint32_t offset)
Offset the resulting set of matching documents.
Definition WriteTransactionPendingCursorOperation.cpp:62
basic_json<> json
default JSON class
Definition json.hpp:2933