Rust

UStore for Rust

cargo add ustore 1.0.0-rc.1 · d6d40961

Topics

Installation1The crate links the engine library CMake builds and consumes it through the C ABI in c/ustore/.
Quickstart27A Database owns its directory, and a Collection addresses one collection in it by name, as the Python binding does with db['movies'].
Collections32A Key is a UUID, sixteen bytes ordered as their bytes, and converts from [u8; 16], from a UUID, or from a u64 or u128 spelled big-endian, so keys made from integers order as the integers.
Reads and Writes65Beneath the collections, every verb takes a batch, names its collections by identifier, and hands back what its call produced.
Scans52
Batches and Arenas92A call addresses the head of the database, a transaction, or a snapshot, and never two of them.
Transactions17
Snapshots8
Documents61Documents are JSON text, which the engine parses as it writes them.
Graphs35A graph collection, created with Modality::Graph, indexes every edge from both of its vertices, and an Edge is laid out as the source, target and identifier keys the ABI puts on its tapes.
Errors3Every fallible call answers Result<T, Error>, where the error carries the Status the C ABI reported and the static message beside it, so nothing allocates on the failure path.
Platform Notes14