Module Ask.Row

Row descriptions.

A row describe rows of table or query results. It is a cartesian product of columns and an OCaml constructor for injecting rows into OCaml values.

type ('r, 'a) prod

The type for constructing a cartesian product whose final result will be represented by OCaml values of type 'r.

type 'r t = ('r'r) prod

The type for a row represented by OCaml values of type 'r.

val unit : 'a -> ('r'a) prod

unit f is a (virtual) unit column with constructor f to be saturated by prod.

val prod : ('r'a -> 'b) prod -> ('r'a) Col.t -> ('r'b) prod

prod r c is the product of columns r with c.

val empty : unit t

empty is the empty product unit (). A row specification for side effecting SQL statements, (e.g. UPDATE).

val cols : ('r'a) prod -> 'r Col.v list

cols r are the columns in row r, from left-to-right, untyped.

module Cols : sig ... end

Row specification syntax.

module Quick : sig ... end

Quick row specification syntax for query results.


val pp_header : Stdlib.Format.formatter -> 'r t -> unit

pp_header formats the column names of the row.

val value_pp : 'r t -> Stdlib.Format.formatter -> 'r -> unit

value_pp r formats values of r.

val list_pp : ?header:bool -> 'r t -> Stdlib.Format.formatter -> 'r list -> unit

list_pp formats list of values of r, one per line. If header is true, starts by formatting the headers of r.