galchemy/session/execution

Types

pub type ExecutedQuery(result) {
  ExecutedQuery(query: query.Query, result: result)
}

Constructors

pub type ExecutionError(exec_error) {
  SessionError(unit_of_work.SessionError)
  QueryError(exec_error)
}

Constructors

pub type FlushExecution(result) {
  FlushExecution(
    inserts: List(ExecutedQuery(result)),
    updates: List(ExecutedQuery(result)),
    deletes: List(ExecutedQuery(result)),
  )
}

Constructors

Values

pub fn execute(
  session: unit_of_work.Session,
  executor: fn(query.Query) -> Result(result, exec_error),
) -> Result(
  #(FlushExecution(result), unit_of_work.Session),
  ExecutionError(exec_error),
)
pub fn queries(
  execution: FlushExecution(result),
) -> List(ExecutedQuery(result))
Search Document