[][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 (_id,content) in persy.scan("seg")? {
    assert_eq!(content[0], 20);
    //....
}

Structs

Config

Persy configuration structure.

IndexId

Unique identifier of an index

IndexInfo

Index definition details

IndexIter

Index Iterator implementation for iterating on a range of keys

IteratorItemDeprecated

Snapshot of a record from the segment iterator

Persy

Main structure to operate persy storage files

PersyId

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

RecordScannerDeprecated

IntoIterator of persistent records of a segment

RecordScannerTxDeprecated

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

SegmentId

Unique identifier of a segment

SegmentIter

Iterator implementation to scan a segment

Transaction

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

TransactionFinalize

prepared transaction state

TxIndexIter

Index Iterator implementation for iterating on a range of keys

TxSegmentIter

Iterator implementation to scan a segment considering in transaction changes.

Enums

IndexTypeId

Enum of all the possible Key or Value types for indexes

PersyError

Enum of possible errors from Persy

TxStrategy

Concurrent Modification Strategy for resolution of conflict on commit.

Value

The associated value to the index key

ValueMode

Define the behavior of the index in case a key value pair already exists

Traits

IndexType

Trait implemented by all supported types in the index

Type Definitions

PRes
TransactionId