Std.Db.Driver
17 public declarations
- ask
&Std.Db.Driver.Tx -> Str -> &Array[Std.Db.Driver.Value] -> Result[Std.Db.Driver.Rows, Std.Db.Driver.Error]Ask a transaction's own connection, rather than the pool.
- Client
A driver owns synchronization and closes admission before releasing its resources.
- close
&Std.Db.Driver.Client -> Result[(), Std.Db.Driver.Error]Close a client and the connections it holds.
- Column
A column in a result set: its name, and what the database calls its type.
- connect
&Array[Std.Db.Driver.Driver] -> Str -> Int -> Result[Std.Db.Driver.Client, Std.Db.Driver.Error]Open a client for a connection string, using the first driver that knows the scheme.
- Driver
A connector is an ordinary value; applications choose which drivers they admit.
- error
Str -> Str -> Str -> Std.Db.Driver.ErrorAn error naming the driver, the kind of failure, and what happened.
- Error
Why a database call did not succeed, and which driver said so.
- execute
&Std.Db.Driver.Client -> Str -> Result[Std.Db.Driver.Rows, Std.Db.Driver.Error]Run a statement that carries no values.
- Placeholders
How a driver writes the places where values go in a statement.
- query
&Std.Db.Driver.Client -> Str -> &Array[Std.Db.Driver.Value] -> Result[Std.Db.Driver.Rows, Std.Db.Driver.Error]Run a statement with values bound to its placeholders.
- Rows
What a statement answered: its columns, its rows, and the command that ran.
- run
&Std.Db.Driver.Tx -> Str -> Result[Std.Db.Driver.Rows, Std.Db.Driver.Error]Run a statement on the connection a transaction holds.
- select
&Array[Std.Db.Driver.Driver] -> Str -> Result[Std.Db.Driver.Driver, Std.Db.Driver.Error]Select exactly one driver without exposing connection-string contents in errors.
- transaction
&Std.Db.Driver.Client -> fn(Std.Db.Driver.Tx) -> Result[Std.Db.Driver.Rows, Std.Db.Driver.Error] -> Result[Std.Db.Driver.Rows, Std.Db.Driver.Error]Run an action inside a transaction, on one connection, whichever backend
- Tx
One connection, held for the length of a transaction.
- Value
Values retain their kind across the driver boundary; drivers bind them separately.
