lamb

Types

pub type Access {
  Public
  Protected
  Private
}

Constructors

  • Public
  • Protected
  • Private
pub type Config {
  Config(
    name: String,
    access: Access,
    kind: Kind,
    registered: Bool,
  )
}

Constructors

  • Config(
      name: String,
      access: Access,
      kind: Kind,
      registered: Bool,
    )
pub type Error {
  AlreadyRegistered(Name)
}

Constructors

  • AlreadyRegistered(Name)
pub type Kind {
  Set
  Bag
}

Constructors

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

Constructors

  • Records(List(record), Step)
  • End(List(record))
pub type Step
pub type Table(index, record) {
  Table(
    reference: TableId,
    name: Name,
    kind: Kind,
    access: Access,
    registered: Bool,
  )
}

Constructors

  • Table(
      reference: TableId,
      name: Name,
      kind: Kind,
      access: Access,
      registered: Bool,
    )

Functions

pub fn all(
  from table: Table(a, b),
  where query: Query(a, b, c),
) -> List(d)
pub fn batch(
  from table: Table(a, b),
  by limit: Int,
  where query: Query(a, b, c),
) -> Partial(d)
pub fn continue(step: Step) -> Partial(a)
pub fn count(
  from table: Table(a, b),
  where query: Query(a, b, c),
) -> Int
pub fn create(config: Config) -> Result(Table(a, b), Error)
pub fn delete(table: Table(a, b)) -> Nil
pub fn erase(
  table: Table(a, b),
  where query: Query(a, b, c),
) -> Int
pub fn from_name(name: String) -> Result(Reference, Nil)
pub fn insert(table: Table(a, b), index: a, record: b) -> Nil
pub fn is_alive(table: Table(a, b)) -> Bool
Search Document