lamb

Types

pub type Access {
  Public
  Protected
  Private
}

Constructors

  • Public
  • Protected
  • Private
pub type Error(index) {
  NotSupported(Store)
  NotFound(index)
  AlreadyExists(Access, Name)
}

Constructors

  • NotSupported(Store)
  • NotFound(index)
  • AlreadyExists(Access, Name)
pub type Partial(record) {
  Records(List(record), Step)
  End(List(record))
}

Constructors

  • Records(List(record), Step)
  • End(List(record))
pub type Step
pub type Store {
  Set
  Bag
}

Constructors

  • Set
  • Bag
pub opaque type Table(index, record)

Functions

pub fn all(
  from table: Table(a, b),
  where query: Query(a, b),
) -> List(c)
pub fn batch(
  from table: Table(a, b),
  by limit: Int,
  where query: Query(a, b),
) -> Partial(c)
pub fn continue(step: Step) -> Partial(a)
pub fn count(
  from table: Table(a, b),
  where query: Query(a, b),
) -> Int
pub fn create_table(
  store: Store,
  access: Access,
  name: String,
) -> Result(Table(a, b), Error(a))
pub fn delete(
  table: Table(a, b),
  where query: Query(a, b),
) -> Int
pub fn delete_table(table: Table(a, b)) -> Nil
pub fn from_name(name: String) -> Result(Reference, Nil)
pub fn get(table: Table(a, b), index: a) -> Result(b, Error(a))
pub fn insert(table: Table(a, b), rows: List(#(a, b))) -> Nil
pub fn is_alive(table: Table(a, b)) -> Bool
pub fn update(
  table: Table(a, b),
  where query: Query(a, b),
) -> Result(Int, Error(a))
Search Document