Std.Db
28 public declarations
- affected
&Std.Db.Rows -> IntHow many rows a statement that produced none reported changing.
- asDriverRows
&Std.Db.Rows -> Std.Db.Driver.RowsThis result as the driver layer carries one.
- begin
Std.Db.Session.Connection -> Result[Std.Db.Session.Connection, Std.Db.Session.DbError]Begin a transaction.
- beginWith
Std.Db.Session.Connection -> &Std.Db.Isolation -> Result[Std.Db.Session.Connection, Std.Db.Session.DbError]Begin a transaction at a stated level of protection.
- closePool
&Std.Db.Pool -> Result[(), Std.Db.Session.DbError]Close admission and every queued connection; borrowers close their own returns.
- column
&Std.Db.Rows -> Str -> Array[Option[Str]]Every value in one column.
- Column
A column of a result.
- commit
Std.Db.Session.Connection -> Result[Std.Db.Session.Connection, Std.Db.Session.DbError]Keep everything the transaction did.
- indexOfColumn
&Std.Db.Rows -> Str -> IntWhere a column sits, or `-1` when the result has no column of that name.
- inTransaction
&Std.Db.Session.Connection -> BoolWhether a connection is inside a transaction, failed or not.
- Isolation
How much a transaction is protected from what other transactions are doing.
- pool
&Std.Db.Session.Config -> Int -> Result[Std.Db.Pool, Std.Db.Session.DbError]A pool of open connections, shared between threads.
- Pool
A set of connections shared between threads.
- release
Std.Db.Session.Connection -> Str -> Result[Std.Db.Session.Connection, Std.Db.Session.DbError]Forget a marked point, keeping everything done since.
- rollback
Std.Db.Session.Connection -> Result[Std.Db.Session.Connection, Std.Db.Session.DbError]Undo everything the transaction did.
- rollbackTo
Std.Db.Session.Connection -> Str -> Result[Std.Db.Session.Connection, Std.Db.Session.DbError]Undo back to a marked point, keeping what came before it.
- rowCount
&Std.Db.Rows -> IntHow many rows a result holds.
- Rows
What a query produced.
- run
Std.Db.Session.Connection -> Str -> &Array[Option[Str]] -> Result[(Std.Db.Rows, Std.Db.Session.Connection), Std.Db.Session.DbError]Run a statement with values supplied apart from it.
- savepoint
Std.Db.Session.Connection -> Str -> Result[Std.Db.Session.Connection, Std.Db.Session.DbError]Mark a point a transaction can be returned to without undoing all of it.
- simple
Std.Db.Session.Connection -> Str -> Result[(Std.Db.Rows, Std.Db.Session.Connection), Std.Db.Session.DbError]Run text the server plans and executes in one step.
- statusOf
&Std.Db.Session.Connection -> Std.Db.Session.TransactionStatusWhere a connection stands, so a caller can ask before acting.
- transaction
&Std.Db.Pool -> fn(Std.Db.Session.Connection) -> (Result[T, Std.Db.Session.DbError], Std.Db.Session.Connection) -> Result[T, Std.Db.Session.DbError]Take a connection, run an action inside a transaction on it, and put it
- transactionWith
&Std.Db.Pool -> &Std.Db.Isolation -> fn(Std.Db.Session.Connection) -> (Result[T, Std.Db.Session.DbError], Std.Db.Session.Connection) -> Result[T, Std.Db.Session.DbError]The same, at a stated level of protection.
- value
&Std.Db.Rows -> Int -> Str -> Option[Str]One value by row and column name, absent when either is missing or when the
- withConnection
&Std.Db.Pool -> fn(Std.Db.Session.Connection) -> (Result[T, Std.Db.Session.DbError], Std.Db.Session.Connection) -> Result[T, Std.Db.Session.DbError]Take a connection, hand it to an action, and put it back however the action
- withSavepoint
Std.Db.Session.Connection -> Str -> fn(Std.Db.Session.Connection) -> (Result[T, Std.Db.Session.DbError], Std.Db.Session.Connection) -> (Result[T, Std.Db.Session.DbError], Std.Db.Session.Connection)Run an action between two marked points, undoing back to the first if it
- withTransaction
Std.Db.Session.Connection -> fn(Std.Db.Session.Connection) -> (Result[T, Std.Db.Session.DbError], Std.Db.Session.Connection) -> (Result[T, Std.Db.Session.DbError], Std.Db.Session.Connection)Run an action inside a transaction, and undo it if the action failed.
