cubdb v0.1.0 CubDB.Btree View Source

Link to this section Summary

Link to this section Types

Link to this type

branch_node() View Source
branch_node() :: {:b, [{key(), location()}]}

Link to this type

btree_header() View Source
btree_header() :: {btree_size(), location()}

Link to this type

deleted_node() View Source
deleted_node() :: :d

Link to this type

leaf_node() View Source
leaf_node() :: {:l, [{key(), location()}]}

Link to this type

t() View Source
t() :: %CubDB.Btree{
  capacity: non_neg_integer(),
  root: branch_node() | leaf_node(),
  root_loc: location(),
  size: btree_size(),
  store: CubDB.Store.t()
}

Link to this type

terminal_node() View Source
terminal_node() :: value_node() | deleted_node()

Link to this type

value_node() View Source
value_node() :: {:v, val()}

Link to this section Functions

Link to this macro

branch(args \\ []) View Source (macro)

Link to this macro

branch(record, args) View Source (macro)

Link to this function

has_key?(btree, key) View Source
has_key?(CubDB.Btree.t(), key()) :: {true, val()} | {false, nil}

Link to this function

insert(btree, key, value) View Source
insert(CubDB.Btree.t(), key(), val()) :: CubDB.Btree.t()

Link to this function

key_range(tree, min_key \\ nil, max_key \\ nil, reverse \\ false) View Source
key_range(CubDB.Btree.t(), key(), key(), boolean()) ::
  CubDB.Btree.KeyRange.t()

Link to this macro

leaf(args \\ []) View Source (macro)

Link to this macro

leaf(record, args) View Source (macro)

Link to this function

lookup(tree, key) View Source
lookup(CubDB.Btree.t(), key()) :: val() | nil

Link to this function

mark_deleted(btree, key) View Source
mark_deleted(CubDB.Btree.t(), key()) :: CubDB.Btree.t()

Link to this macro

value(args \\ []) View Source (macro)

Link to this macro

value(record, args) View Source (macro)