Crate persy[−][src]
Expand description
Persy - Transactional Persistence Engine
Simple single file, durable, paginated, transactional persistence engine, based on copy on write, write ahead log, two phase commit.
Example
use persy::{Persy,Config}; //... Persy::create("./open.persy")?; let persy = Persy::open("./open.persy",Config::new())?; let mut tx = persy.begin()?; tx.create_segment("seg")?; let data = vec![1;20]; tx.insert("seg", &data)?; let prepared = tx.prepare()?; prepared.commit()?; for (_id,content) in persy.scan("seg")? { assert_eq!(content[0], 20); //.... }
Structs
Wrapper for Vec<u8>
for use it in index keys or values
Persy configuration structure.
Unique identifier of an index
Index definition details
Index Iterator implementation for iterating on a range of keys
Options, flags, configs which can be used to configure how a persy database is opened.
Main structure to operate persy storage files
Identifier of a persistent record, can be used for read, update or delete the record
Intermediate recover status to select witch transactions to commit or rollback and list witch transactions are in a intermediate state
Represents a looked-up segment
Iterator implementation to scan a segment
Read snapshot at a specific point in time.
Iterator implementation to scan a segment considering in transaction changes.
Transaction container, it include all the changes done in a transaction.
Configure the parameters for the transaction on the begin of a new transaction.
prepared transaction state
Index Iterator implementation for iterating on a range of keys
Iterator implementation to scan a segment considering in transaction changes.
Enums
Enum of all the possible Key or Value types for indexes
Enum of possible errors from Persy
Possible state of a transaction in the log
Concurrent Modification Strategy for resolution of conflict on commit.
The associated value to the index key
Define the behavior of the index in case a key value pair already exists