galchemy/session/execution
Types
pub type ExecutedQuery(result) {
ExecutedQuery(query: query.Query, result: result)
}
Constructors
-
ExecutedQuery(query: query.Query, result: result)
pub type ExecutionError(exec_error) {
SessionError(unit_of_work.SessionError)
QueryError(exec_error)
}
Constructors
-
SessionError(unit_of_work.SessionError) -
QueryError(exec_error)
pub type FlushExecution(result) {
FlushExecution(
inserts: List(ExecutedQuery(result)),
updates: List(ExecutedQuery(result)),
deletes: List(ExecutedQuery(result)),
)
}
Constructors
-
FlushExecution( inserts: List(ExecutedQuery(result)), updates: List(ExecutedQuery(result)), deletes: List(ExecutedQuery(result)), )
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))