Fun_sql.Query
val sql : ('a, Stdlib.Format.formatter, unit, string) Stdlib.format4 -> 'a
type (-'row, 'r) ret =
| Unit : ('row, unit) ret
This is used for queries which do not return result rows.
| Ret : ('row -> 'r) -> ('row, 'r Stdlib.Seq.t) ret
This is for queries which return result rows.
val unit : ('a, unit) ret
val ret : ('a -> 'b) -> ('a, 'b Stdlib.Seq.t) ret
exception More_than_one
Thrown if we are expecting at most one result but get more.
val one : (unit -> 'a Stdlib.Seq.node) -> 'b option
one seq is Some a if a is the first and only element of seq, or None if seq is empty.
one seq
Some a
a
seq
None
More_than_one
if seq contains more than one element.
val all : 'a Stdlib.Seq.t -> 'a list
Get all results together.