Field access through a proxy is shorthand like any other read without an arena, while gist and gather export into the arena they are given.
Besides assign, a reference offers insert, update and upsert, and as switches the format every later call exchanges.
gather reads fields of many documents into a docs_table, converting each field into its column type on a best-effort basis.
A header whose column types are known at compile time is built column by column:
A table is a view: one ustore_docs_column_view_t per column lives in the arena, while its index and header view the keys and the header the gather was given.
Every cell carries valid, converted and collides flags beside its value, which is meaningful only when valid.
API
Types
docs_read_collection_tMap from keys to JSON documents that only reads, cheap to construct and to copy.
A handle addresses either the current state of a collection or its view inside a transaction or a snapshot, holds no state of its own, so any number of threads share it, and never outlives its database. The type of a handle shapes only how values cross it, since documents are stored as JSON whatever they arrive as.
template <typename... column_types_>
class docs_table
A view that copies cheaply: its columns live in the arena of the gather, while its index and header view the keys and fields the gather was asked for.
Classdocs_collection_tTransactional map from keys to JSON documents, cheap to construct, which reads and writes the head or the view of a transaction.4
Classdocs_read_refProxy reading documents, or fields inside them, at a batch of locations, through a snapshot, a transaction or the head, which never writes them.6
template <typename locations_type_>
class docs_read_ref
A read given an arena answers views into it, valid until the next call given that arena. The same read without one is shorthand: it makes a one-off arena and answers a result owning it, or a scalar copied out of it, which is slower than reusing an arena and keeps no state anywhere. Copying is cheap and nothing throws.