1#ifndef DITTO_DOCUMENT_H
2#define DITTO_DOCUMENT_H
4#include "DocumentId.hpp"
5#include "DocumentPath.hpp"
9using CDocument_t =
struct CDocument;
20class DITTO_DEPRECATED_BECAUSE(
21 "Use DQL (Ditto Query Language) instead. For more information "
22 "see: https://ditto.com/link/legacy-to-dql-guide") Document {
23 DITTO_DISABLE_DEPRECATED_WARNINGS(
"The legacy query API is deprecated")
24 friend class DocumentHelpers;
25 friend class DocumentOperator;
26 friend class LiveQuery;
27 friend class QueryOperator;
28 friend class PendingIDSpecificOperation;
29 friend class PendingCursorOperation;
31 CDocument_t *document;
33 explicit Document(CDocument_t *document);
36 Document(
const Document &) =
delete;
37 Document(Document &&)
noexcept;
66 DITTO_REENABLE_WARNINGS
nlohmann::json value() const
Get the document's inner value.
DocumentId id() const
Get the ID of the document.
DocumentPath operator[](std::string initial_path)
Used to specify a path to a key in the document that you can subscript further to access a nested key...
Provides an interface to specify a path to a key in a document that you can then call a function on t...
Definition DocumentPath.hpp:36
Namespace for the Ditto C++ SDK types and functions.
Definition AbstractDocumentPath.hpp:19
An identifier for a Document.
Definition DocumentId.hpp:23