Expand description
The SurrealDB datastore layer.
This crate owns the keyspace: which keys exist, and the durable shapes their
values take. How a key encodes is one layer down, in surrealdb-kvs; what the
engine does with a decoded value is one layer up.
This crate is an internal implementation detail of SurrealDB: its API is
unstable and changes without notice. Depend on the surrealdb SDK or
surrealdb-core instead.
Re-exports§
pub use error::DatastoreError;pub use config::TransactionConfig;pub use factory::ReadRequest;pub use factory::TransactionFactory;pub use feature::FeatureLevelCell;pub use feature::FeatureLevelState;pub use feature::LevelledMode;pub use feature::Readable;pub use into::IntoBytes;pub use layouts::Admission;pub use layouts::LayoutSet;pub use layouts::RowGate;pub use tr::Transactor;pub use tx::DocIdsReclaimClaim;pub use tx::Transaction;pub use tx::WriteBatch;pub use surrealdb_catalog as catalog;
Modules§
- absence
- Creates whose check that the key is absent is made for many keys at once.
- api
- This module defines the API for a transaction in a key-value store.
- cache
- catalog_
reads - What a stretch of work reads of a transaction’s catalog.
- clock
- The wall-clock seam for time-dependent coordination state.
- close
- Work a layer above the datastore owes once a transaction’s outcome is known.
- config
- The transaction layer’s own knobs.
- consts
- creations
- The records a transaction creates in the tables its writes are reading.
- err
- error
- Failures raised by the datastore layer.
- expr
- The type definitions for the computation format of the surreaql executor.
- factory
- What opens a transaction.
- feature
- The store’s feature level, as a transaction sees it.
- index_
shapes - The value shapes a B-tree, spatial or vector index has stored, per column.
- index_
state - Reading durable index build state.
- into
- key
- The engine’s keyspace: which keys exist, and what each one spells.
- layouts
- The generation check that a reader of stored records runs before it reads any field of a row.
- out_
of_ line - A future polled through a function pointer taken where it was built.
- pending_
guard - The pending-state guards of a vector index, whatever its kind.
- sequences
- Distributed sequence and ID generation management.
- speculation
- A transaction’s writes held apart from its storage, for planning a program against what its own schema statements will do before they run.
- tasklease
- timestamp
- tr
- triggers
- Wake-ups a committing transaction fires, and the count of its datastore’s
catalog commits ([
CatalogEpoch]). - tx
- Transaction implementation and cache coordination.
- unseen_
indexes - The indexes a transaction cannot read.
- util
- val
- values
- The values the keyspace binds.
- version
Structs§
Enums§
- Direction
- The direction of a scan over a key range.
- Error
- An error originating from the KVS (Key-Value Store) layer.
- Transaction
Type - Specifies whether the transaction is read-only or writeable.
Constants§
Functions§
- is_
condition_ not_ met - Whether a failure is a conditional write reporting that the value it required was not there.
- is_
indeterminate_ commit - Whether a failure reports a commit whose outcome is unknown — the transaction may or may not have been applied.
- is_
retryable_ transaction_ conflict - Whether a failure is a transaction conflict the caller may retry.
- is_
shutdown_ error - Whether a failure reports that the storage engine is shutting down.
- storage_
error - Recover a storage failure from an
anyhow::Error, whichever shape it took.