[][src]Crate persy

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()?;
persy.create_segment(&mut tx, "seg")?;
let data = vec![1;20];
persy.insert_record(&mut tx, "seg", &data)?;
let prepared = persy.prepare_commit(tx)?;
persy.commit(prepared)?;
for rec in persy.scan_records("seg")? {
    assert_eq!(rec.content[0], 20);
    //....
}

Structs

Config

Persy configuration structure.

IteratorItem

Snapshot of a record from the segment iterator

Persy

Main structure to operate persy storage files

RecordScanner

IntoIterator of persistent records of a segment

RecordScannerTx

IntoIterator of persistent records of a segment that include eventual in transaction changes

TransactionFinalize
TxFinalize

prepared transaction state

Enums

PersyError
TxStrategy

Concurrent Modification Strategy for resolution of conflict on commit.

Value
ValueMode

Traits

IndexType

Type Definitions

PRes
PersyId

Identifier of a persistent record, can be used for read, update or delete the record

Transaction

Transaction container, it include all the changes done in a transaction.

TransactionId