6#include "Collection.hpp"
7#include "DiskUsage.hpp"
8#include "PendingCollectionsOperation.hpp"
9#include "QueryResult.hpp"
10#include "StoreObserver.hpp"
11#include "WriteTransaction.hpp"
12#include "WriteTransactionResult.hpp"
21class DittoHandleWrapper;
29 std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper;
31 Store(std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper);
32 void set_weak_ditto_fields(std::weak_ptr<Ditto::Fields> weak_ditto_fields);
33 std::weak_ptr<Ditto::Fields> weak_ditto_fields;
35 bool unregister_observer(std::shared_ptr<StoreObserver>);
38 std::set<std::shared_ptr<StoreObserver>> observers;
63 std::vector<std::unique_ptr<WriteTransactionResult>>
110 std::shared_ptr<StoreObserver>
129 std::shared_ptr<StoreObserver>
131 StoreObservationHandler change_handler);
144 std::shared_ptr<StoreObserver>
146 StoreObservationHandlerWithNextSignal change_handler);
162 std::shared_ptr<StoreObserver>
164 StoreObservationHandlerWithNextSignal change_handler);
A reference to a collection in a Store.
Definition Collection.hpp:26
Provides an interface to be able to monitor local files.
Definition DiskUsage.hpp:65
The entrypoint to the Ditto SDK.
Definition Ditto.hpp:32
These objects are returned when calling collections() on Store objects.
Definition PendingCollectionsOperation.hpp:58
Representes the returned results when executing a DQL query, containing a QueryResultItem for each ma...
Definition QueryResult.hpp:104
Provides access to Collections and a write transaction API.
Definition Store.hpp:25
DiskUsage get_disk_usage() const
Provides access to the Store's disk usage.
Definition Store.cpp:42
std::vector< std::unique_ptr< WriteTransactionResult > > write(std::function< void(WriteTransaction &)> fn) const
Allows you to group multiple operations together that affect multiple documents, potentially across m...
Definition Store.cpp:45
PendingCollectionsOperation collections() const
Returns an object that lets you fetch or observe the collections in the store.
Definition Store.cpp:38
std::shared_ptr< StoreObserver > register_observer(std::string query, StoreObservationHandler change_handler)
Installs and returns a change observer for a query, configuring Ditto to call the provided change han...
Definition Store.cpp:76
std::shared_ptr< StoreObserver > register_observer(std::string query, nlohmann::json query_args, StoreObservationHandlerWithNextSignal change_handler)
Installs and returns a change observer for a query, configuring Ditto to call the provided change han...
QueryResult execute(std::string query, nlohmann::json query_args=nullptr)
Executes a DQL query and returns matching items as a query result.
Definition Store.cpp:57
Collection collection(std::string name) const
Returns a Collection with the provided name.
Definition Store.cpp:34
std::shared_ptr< StoreObserver > register_observer(std::string query, nlohmann::json query_args, StoreObservationHandler change_handler)
Installs and returns a change observer for a query, configuring Ditto to call the provided in change ...
Definition StoreObserver.hpp:45
WriteTransaction exposes functionality that allows you to perform multiple operations on the store wi...
Definition WriteTransaction.hpp:25
basic_json<> json
default JSON class
Definition json.hpp:2933