Rel_sql.StmtTyped SQL statements.
See the SQL statement typing howto for a short introduction.
The type for SQL statement arguments (parameters).
val pp_arg : Stdlib.Format.formatter -> arg -> unitpp_arg formats an argument with Rel.Type.value_pp.
The type for a closed (all arguments are bound) SQL statement returning rows of type 'r. Note that this must be a single statement.
v sql rev_args result is a closed statement with srouce sql, revered list of arguments (parameters) rev_args and yielding rows of type result.
val src : 'r t -> stringsrc st is the source SQL statement of st.
val pp_src : Stdlib.Format.formatter -> 'r t -> unitpp_src formats the statement's source.
val pp : Stdlib.Format.formatter -> 'r t -> unitpp ppf st formats the statement's source and its arguments.
val func : string -> 'a func -> 'afunc sql f is the binding function of f used on the source SQL statement sql.
ret st row is an open SQL statement st returning values of type row.
val arg : 'a Rel.Type.t -> 'b func -> ('a -> 'b) funcarg t f binds a new variable of type t to f.
val (@->) : 'a Rel.Type.t -> 'b func -> ('a -> 'b) funct @-> f is arg t f.
unit is ret Rel.Row.empty.
The following constants get redefined here to allow consise specification with the Sql.Stmt.() notation.
val bool : bool Rel.Type.tbool is Rel.Type.Bool.
val int : int Rel.Type.tint is Rel.Type.Int.
val int64 : int64 Rel.Type.tint64 is Rel.Type.Int64.
val float : float Rel.Type.tfloat is Rel.Type.Float.
val text : string Rel.Type.ttext is Rel.Type.Text.
val blob : string Rel.Type.tblob is Rel.Type.Blob.
val option : 'a Rel.Type.t -> 'a option Rel.Type.toption t is Rel.Type.Option t.
See the this section of the SQL statement typing howto.
val proj : ('r -> 'a) -> 'a Rel.Type.t -> ('r -> 'b) func -> ('r -> 'b) funcproj p t binds the projection p of a value of type t.