based
Types
pub type DB(a, c) {
DB(conn: c, execute: Adapter(a, c))
}
Constructors
-
DB(conn: c, execute: Adapter(a, c))
pub type Query(a) {
Query(
sql: String,
args: List(Value),
decoder: Option(dynamic.Decoder(a)),
)
}
Constructors
-
Query( sql: String, args: List(Value), decoder: Option(dynamic.Decoder(a)), )
pub type Returned(a) {
Returned(count: Int, rows: List(a))
}
Constructors
-
Returned(count: Int, rows: List(a))
pub type Value {
String(String)
Int(Int)
Float(Float)
Bool(Bool)
Null
}
Constructors
-
String(String)
-
Int(Int)
-
Float(Float)
-
Bool(Bool)
-
Null
pub type WithConnection(a, b, c) =
fn(b, fn(DB(a, c)) -> a) -> a