Module Petrol.Expr

Defines an extensible embedding of SQL expressions.

type 'a t

'a t represents an SQL expression that evaluates to a value of OCaml type 'a

val pp : Stdlib.Format.formatter -> 'a t -> unit

pp fmt expr pretty prints the expression expr.

Note You shouldn't have to call this yourself. Petrol usually takes care of this for you, but you may want to use it for debugging.

type wrapped_assign

An opaque wrapper that represents an assignment of a value to a particular field in a table.

type 'a expr_list =
  1. | [] : unit expr_list
  2. | :: : ('a t * 'b expr_list) -> ('a * 'b) expr_list

Represents a heterogeneous sequence of SQL expressions.

val pp_expr_list : Stdlib.Format.formatter -> 'a expr_list -> unit

pp_expr_list fmt exps pretty prints the expression list exps of type expr_list.

See also t and pp.