Trait WriteTransaction

Source
pub trait WriteTransaction: ReadTransaction {
    // Required methods
    fn put(
        &self,
        prefix: u8,
        key: &Vec<u8>,
        suffix: Option<u8>,
        value: &Vec<u8>,
        family: &Option<String>,
    ) -> Result<(), StorageError>;
    fn replace(
        &self,
        prefix: u8,
        key: &Vec<u8>,
        suffix: Option<u8>,
        value: &Vec<u8>,
        family: &Option<String>,
    ) -> Result<(), StorageError>;
    fn del(
        &self,
        prefix: u8,
        key: &Vec<u8>,
        suffix: Option<u8>,
        family: &Option<String>,
    ) -> Result<(), StorageError>;
    fn del_all(
        &self,
        prefix: u8,
        key: &Vec<u8>,
        all_suffixes: &[u8],
        family: &Option<String>,
    ) -> Result<(), StorageError>;
    fn del_property_value(
        &self,
        prefix: u8,
        key: &Vec<u8>,
        suffix: Option<u8>,
        value: &Vec<u8>,
        family: &Option<String>,
    ) -> Result<(), StorageError>;
    fn del_all_values(
        &self,
        prefix: u8,
        key: &Vec<u8>,
        property_size: usize,
        suffix: Option<u8>,
        family: &Option<String>,
    ) -> Result<(), StorageError>;
}

Required Methods§

Source

fn put( &self, prefix: u8, key: &Vec<u8>, suffix: Option<u8>, value: &Vec<u8>, family: &Option<String>, ) -> Result<(), StorageError>

Save a property value to the store.

Source

fn replace( &self, prefix: u8, key: &Vec<u8>, suffix: Option<u8>, value: &Vec<u8>, family: &Option<String>, ) -> Result<(), StorageError>

Replace the property of a key (single value) to the store.

Source

fn del( &self, prefix: u8, key: &Vec<u8>, suffix: Option<u8>, family: &Option<String>, ) -> Result<(), StorageError>

Delete a property from the store.

Source

fn del_all( &self, prefix: u8, key: &Vec<u8>, all_suffixes: &[u8], family: &Option<String>, ) -> Result<(), StorageError>

Delete all properties of a key from the store.

Source

fn del_property_value( &self, prefix: u8, key: &Vec<u8>, suffix: Option<u8>, value: &Vec<u8>, family: &Option<String>, ) -> Result<(), StorageError>

Delete a specific value for a property from the store.

Source

fn del_all_values( &self, prefix: u8, key: &Vec<u8>, property_size: usize, suffix: Option<u8>, family: &Option<String>, ) -> Result<(), StorageError>

Delete all properties’ values of a key from the store in case the property is a multi-values one

Implementors§