C++

UStore for C++

using namespace unum::ustore; 1.0.0-rc.1 · d6d40961

cpp/ holds the C++ wrappers of UStore’s public C SDK. The *.hpp headers of cpp/ustore/ wrap the same calls in C++ with RAII handles, batched references and typed ranges, and add no ABI of their own. UStore’s sources split into four folders:

  • c/: the public C SDK every wrapper forwards to, the C ABI in c/ustore/*.h, with its own guide, whose Installation covers the wrappers too.
  • cpp/: these wrappers in cpp/ustore/*.hpp, in unum::ustore, and this guide.
  • include/: the first-party classes and templates that advanced users may reuse to build their own low-level stores, each subfolder ustore/<dir>/ opening unum::ustore::<dir>, with its own guide.
  • src/: UStore’s own instantiations of those templates, the engines behind the C ABI.

c/ and cpp/ are both include roots, so every header is spelled <ustore/...> in the tree and once installed. cpp/ustore/ holds one header per part of the wrappers:

  • ustore.hpp: every C++ header below.
  • db.hpp: database_t, transaction_t, snapshot_t and receivers.
  • blobs_collection.hpp: binary collections and their deferred twins.
  • blobs_ref.hpp: batched references to binary values.
  • blobs_range.hpp: cursors over keys, the streams built on them, and key ranges.
  • docs_collection.hpp: document collections and their deferred twins.
  • docs_ref.hpp: batched references to documents.
  • docs_table.hpp: gathered tables.
  • graph_collection.hpp: graph collections and their deferred twins.
  • graph_stream.hpp: adjacency streams.
  • strings_collection.hpp: string-keyed collections, cursors, prefix walks and deferred twins.
  • status.hpp: deferred, and status_code_t, status_t and expected re-exported from ustore/utilities/types.hpp.
  • types.hpp: arenas, stamps, receivers and executors, and the keys, edges and value views re-exported from ustore/utilities/types.hpp.
  • ranges.hpp: strided ranges, argument adapters, read views and tapes.

Topics

Quickstart32Everything lives in unum::ustore, and #include <ustore/ustore.hpp> brings in all of it.
Collections3Each collection type names the modality it holds as modalityk, so create records it and refuses a name starting with , which system collections keep, find refuses a collection holding another with statuscodet::invalidargumentk, and findorcreate creates only when no collection carries the name.
Reads and Writes77No collection exists until one is created, so every call names one.
Scans32
Batches and Arenas62
Transactions13
Snapshots9
Documents35
Graphs26
Platform Notes