Crate gluesql_shared_sled_storage

Source

Modules§

sled
sled is a high-performance embedded database with an API that is similar to a BTreeMap<[u8], [u8]>, but with several additional capabilities for assisting creators of stateful systems.
transaction
Fully serializable (ACID) multi-Tree transactions

Structs§

Atomic
An atomic pointer that can be safely shared between threads.
Batch
A batch of updates that will be applied atomically to the Tree.
BatchManifest
Uses a non-varint Lsn to mark offsets.
CompareAndSwapError
Compare and swap error.
Config
Top-level configuration for the system.
CrossbeamGuard
A guard that keeps the current thread pinned.
Db
The sled embedded database! Implements Deref<Target = sled::Tree> to refer to a default keyspace / namespace / bucket.
IVec
A buffer that may either be inline or remote and protected by an Arc
Iter
An iterator over keys and values in a Tree.
Lazy
A lazily initialized value
Log
A sequential store which allows users to create reservations placed at known log offsets, used for writing persistent data structures that need to know where to find persisted bits in the future.
Owned
An owned heap-allocated object.
PageCache
A lock-free pagecache which supports linkmented pages for dramatically improving write throughput.
RunningConfig
A Configuration that has an associated opened file.
Shared
A pointer to an object protected by the epoch GC.
SharedSledStorage
SledStorage
Subscriber
A subscriber listening on a specified prefix
Tree
A flash-sympathetic persistent lock-free B+ tree.

Enums§

DiskPtr
A pointer to a location on disk or an off-log blob.
Error
An Error type encapsulating various issues that may come up in the operation of a Db.
Event
An event that happened to a key that a subscriber is interested in.
LogKind
The high-level types of stored information about pages and their mutations
LogRead
The result of a read of a log message
Mode
The high-level database mode, according to the trade-offs of the RUM conjecture.
State

Constants§

MAX_MSG_HEADER_LEN
Log messages have a header that might eb up to this length.
MAX_SPACE_AMPLIFICATION
During testing, this should never be exceeded.
MINIMUM_ITEMS_PER_SEGMENT
The minimum number of items per segment. Items larger than this fraction of an io_buf will be stored as an off-log blob.
SEG_HEADER_LEN
Log segments have a header of this length.

Traits§

MergeOperator
A function that may be configured on a particular shared Tree that will be applied as a kind of read-modify-write operator to any values that are written using the Tree::merge method.
Serialize
Items that may be serialized and deserialized
Transactional
A type that may be transacted on in sled transactions.

Functions§

crossbeam_pin
Pins the current thread.
open
Opens a Db with a default configuration at the specified path. This will create a new storage directory at the specified path if it does not already exist. You can use the Db::was_recovered method to determine if your database was recovered from a previous instance. You can use Config::create_new if you want to increase the chances that the database will be freshly created.

Type Aliases§

LogOffset
A file offset in the database log.
Lsn
The logical sequence number of an item in the database log.
PageId
A page identifier.
Result
The top-level result type for dealing with fallible operations. The errors tend to be fail-stop, and nested results are used in cases where the outer fail-stop error can have try ? used on it, exposing the inner operation that is expected to fail under normal operation. The philosophy behind this is detailed on the sled blog.