aarondb

Types

pub type BodyClause =
  ast.BodyClause
pub type DbState =
  state.DbState
pub type PullPattern =
  List(ast.PullItem)
pub type PullResult =
  query_types.PullResult
pub type QueryResult =
  query_types.QueryResult
pub type SpeculativeResult {
  SpeculativeResult(
    state: state.DbState,
    datoms: List(fact.Datom),
  )
}

Constructors

Values

pub fn as_of(
  db: process.Subject(transactor.Message),
  tx: Int,
  q_clauses: List(ast.BodyClause),
) -> query_types.QueryResult
pub fn as_of_bitemporal(
  db: process.Subject(transactor.Message),
  tx: Int,
  valid_time: Int,
  q_clauses: List(ast.BodyClause),
) -> query_types.QueryResult
pub fn as_of_valid(
  db: process.Subject(transactor.Message),
  valid_time: Int,
  q_clauses: List(ast.BodyClause),
) -> query_types.QueryResult
pub fn connect(
  name: String,
) -> Result(process.Subject(transactor.Message), String)
pub fn diff(
  db: process.Subject(transactor.Message),
  from_tx: Int,
  to_tx: Int,
) -> List(fact.Datom)
pub fn explain_speculation(
  res: Result(SpeculativeResult, String),
) -> String

Provides a human-readable explanation of a speculative result or failure.

pub fn get(
  db: process.Subject(transactor.Message),
  eid: fact.Eid,
  attr: String,
) -> List(fact.Value)
pub fn get_one(
  db: process.Subject(transactor.Message),
  eid: fact.Eid,
  attr: String,
) -> Result(fact.Value, Nil)
pub fn history(
  db: process.Subject(transactor.Message),
  eid: fact.Eid,
) -> List(fact.Datom)
pub fn is_leader(db: process.Subject(transactor.Message)) -> Bool
pub fn new_with_adapter_and_timeout(
  adapter: option.Option(storage.StorageAdapter),
  timeout_ms: Int,
) -> process.Subject(transactor.Message)
pub fn p(triple: #(ast.Part, String, ast.Part)) -> ast.BodyClause
pub fn prune(
  db: process.Subject(transactor.Message),
  threshold: Int,
  sovereign: List(String),
) -> Int
pub fn pull_all() -> List(ast.PullItem)
pub fn pull_attr(attr: String) -> List(ast.PullItem)
pub fn pull_except(
  exclusions: List(String),
) -> List(ast.PullItem)
pub fn pull_recursive(
  attr: String,
  depth: Int,
) -> List(ast.PullItem)
pub fn query_at(
  db: process.Subject(transactor.Message),
  q_clauses: List(ast.BodyClause),
  as_of_tx: option.Option(Int),
  as_of_valid: option.Option(Int),
) -> query_types.QueryResult
pub fn query_state(
  state: state.DbState,
  q_clauses: List(ast.BodyClause),
) -> query_types.QueryResult
pub fn query_state_at(
  state: state.DbState,
  q_clauses: List(ast.BodyClause),
  as_of_tx: option.Option(Int),
  as_of_valid: option.Option(Int),
) -> query_types.QueryResult
pub fn query_state_with_rules(
  state: state.DbState,
  q_clauses: List(ast.BodyClause),
  rules: List(ast.Rule),
) -> query_types.QueryResult
pub fn query_with_rules(
  db: process.Subject(transactor.Message),
  q_clauses: List(ast.BodyClause),
  rules: List(ast.Rule),
) -> query_types.QueryResult
pub fn register_composite(
  db: process.Subject(transactor.Message),
  attrs: List(String),
) -> Result(Nil, String)
pub fn register_function(
  db: process.Subject(transactor.Message),
  name: String,
  func: fn(state.DbState, Int, Int, List(fact.Value)) -> List(
    #(fact.Eid, String, fact.Value),
  ),
) -> Nil
pub fn register_predicate(
  db: process.Subject(transactor.Message),
  name: String,
  pred: fn(fact.Value) -> Bool,
) -> Nil
pub fn retract(
  db: process.Subject(transactor.Message),
  facts: List(#(fact.Eid, String, fact.Value)),
) -> Result(state.DbState, String)
pub fn retract_at(
  db: process.Subject(transactor.Message),
  facts: List(#(fact.Eid, String, fact.Value)),
  valid_time: Int,
) -> Result(state.DbState, String)
pub fn retract_entity(
  db: process.Subject(transactor.Message),
  eid: fact.Eid,
) -> Result(state.DbState, String)
pub fn set_config(
  db: process.Subject(transactor.Message),
  config: state.Config,
) -> Nil
pub fn set_schema(
  db: process.Subject(transactor.Message),
  attr: String,
  config: fact.AttributeConfig,
) -> Result(Nil, String)
pub fn set_schema_with_timeout(
  db: process.Subject(transactor.Message),
  attr: String,
  config: fact.AttributeConfig,
  timeout_ms: Int,
) -> Result(Nil, String)
pub fn start_distributed(
  name: String,
  adapter: option.Option(storage.StorageAdapter),
) -> Result(process.Subject(transactor.Message), actor.StartError)
pub fn start_link(
  adapter: option.Option(storage.StorageAdapter),
  timeout_ms: Int,
) -> Result(process.Subject(transactor.Message), actor.StartError)
pub fn start_named(
  name: String,
  adapter: option.Option(storage.StorageAdapter),
) -> Result(process.Subject(transactor.Message), actor.StartError)
pub fn store_rule(
  db: process.Subject(transactor.Message),
  rule: ast.Rule,
) -> Result(Nil, String)
pub fn subscribe_wal(
  db: process.Subject(transactor.Message),
  subscriber: process.Subject(List(fact.Datom)),
) -> Nil
pub fn sync(db: process.Subject(transactor.Message)) -> Nil
pub fn transact(
  db: process.Subject(transactor.Message),
  facts: List(#(fact.Eid, String, fact.Value)),
) -> Result(state.DbState, String)
pub fn transact_at(
  db: process.Subject(transactor.Message),
  facts: List(#(fact.Eid, String, fact.Value)),
  valid_time: Int,
) -> Result(state.DbState, String)
pub fn transact_with_timeout(
  db: process.Subject(transactor.Message),
  facts: List(#(fact.Eid, String, fact.Value)),
  timeout_ms: Int,
) -> Result(state.DbState, String)
pub fn traverse(
  db: process.Subject(transactor.Message),
  eid: fact.Eid,
  path: List(ast.Step),
  max_depth: Int,
) -> Result(List(fact.Value), String)
pub fn trigger_eviction(
  db: process.Subject(transactor.Message),
) -> Result(Nil, String)
pub fn with_facts(
  state: state.DbState,
  facts: List(#(fact.Eid, String, fact.Value)),
) -> Result(SpeculativeResult, String)
Search Document