tablestg 0.4.20

Storage for database tables
Documentation
//! Everything is very preliminary, this crate is not yet at all stable.

/*
  Next: Table struct based on DataType and Store.

  Then parser, expressions, statements, functions ( similar to RustDb ).

  Start off with SELECT statement.
*/

pub use atom_file::Data;
pub use std::sync::Arc; // pstd::Arc does not yet have make_mut

/// A [Table] stores [Value]s which have a specific [DataType].
pub mod table;
pub use table::Table;

/// [Store] - maps keys to variable size values (no size restriction) using 64 bit hash.
pub mod store;
use store::Store;

/// [VBuckMap] - maps keys to small variable size values using 64 bit hash. For possibly large values see [Store].
pub mod vbuckmap;
use vbuckmap::*;

// Remaining modules could be private.

/// [PageSet] - keeps track of changed pages that need saving.
pub mod pageset;
use pageset::{PData, PageSet};

/// List of pages implemented as tree for [VBuckMap].
pub mod pagetree;

/// Bucket for [VBuckMap].
pub mod vbucket;

/// Generic [Value]s.
pub mod value;
use value::*;

/// [DataType] - describes, encodes and decodes [Value]s using [Store].
pub mod datatype;
use datatype::*;

const PAGE_SIZE: u64 = 3952;
// pub const PAGE_SIZE: u64 =  3952;
// pub const PAGE_SIZE: u64 =  4612;

use pstd::localalloc::Local;
/// `StringA<Local>`
pub type LString = pstd::StringA<Local>;
/// `VecA<T, Local>`
pub type LVec<T> = pstd::VecA<T, Local>;
/// `BoxA<T, Local>`
pub type LBox<T> = pstd::BoxA<T, Local>;
/// `RcA<T, Lpcal>`
pub type LRc<T> = pstd::RcA<T, Local>;

mod test;