Module Fun_sql.Query

val sql : ('a, Stdlib.Format.formatter, unit, string) Stdlib.format4 -> 'a
type (-'row, 'r) ret =
  1. | Unit : ('row, unit) ret
    (*

    This is used for queries which do not return result rows.

    *)
  2. | 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.

val all : 'a Stdlib.Seq.t -> 'a list

Get all results together.