Struct tuple_storage::Storage [−][src]
pub struct Storage { /* fields omitted */ }
Methods
impl Storage
[src]
impl Storage
pub fn create(file: File, schema: &str) -> Result<Storage>
[src]
pub fn create(file: File, schema: &str) -> Result<Storage>
pub fn persist(&mut self) -> Result<()>
[src]
pub fn persist(&mut self) -> Result<()>
pub fn open(file: File) -> Result<Storage>
[src]
pub fn open(file: File) -> Result<Storage>
pub fn insert(&mut self, tuple: &mut Tuple) -> Result<(), SchemaError>
[src]
pub fn insert(&mut self, tuple: &mut Tuple) -> Result<(), SchemaError>
Insert does not allow duplicate key and inserts the Tuple in the set in a sorted way
pub fn append(&mut self, tuple: &mut Tuple) -> Result<(), SchemaError>
[src]
pub fn append(&mut self, tuple: &mut Tuple) -> Result<(), SchemaError>
Append allows duplicate key
pub fn update(&mut self, tuple: &mut Tuple) -> Result<usize, SchemaError>
[src]
pub fn update(&mut self, tuple: &mut Tuple) -> Result<usize, SchemaError>
Update all tuples matching the key
returns how many tuples were updated
pub fn remove_all(&mut self, filter: &Filter) -> usize
[src]
pub fn remove_all(&mut self, filter: &Filter) -> usize
Remove all tuples matching the key. Working from the end to the front of the Storage.
pub fn remove(&mut self, filter: &Filter) -> usize
[src]
pub fn remove(&mut self, filter: &Filter) -> usize
Delete all tuples matching the key sorted
pub fn iter(&self) -> StorageIterator
[src]
pub fn iter(&self) -> StorageIterator
pub fn get(&self, offset: u64) -> Option<Tuple>
[src]
pub fn get(&self, offset: u64) -> Option<Tuple>
pub fn create_filter(&self, filter: &str) -> Result<Filter, SchemaParseError>
[src]
pub fn create_filter(&self, filter: &str) -> Result<Filter, SchemaParseError>
pub fn schema_to_string(&self) -> String
[src]
pub fn schema_to_string(&self) -> String
Trait Implementations
impl Debug for Storage
[src]
impl Debug for Storage
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Drop for Storage
[src]
impl Drop for Storage
impl PartialEq for Storage
[src]
impl PartialEq for Storage