Row.Quick
Quick row specification syntax for query results.
These functions contructs rows with columns that have no parameters and a default projection Col.no_proj
. They can be used to quickly type SQL statement results.
WARNING. Since by default these column constructors lack projection Row
.pp cannot be used on them. Those created with tuple constructors do however (re)define projection.
val bool : ?proj:('r -> bool) -> string -> ('r, bool) Col.t
bool n
is a boolean column named n
.
val int : ?proj:('r -> int) -> string -> ('r, int) Col.t
int n
is an integer column named n
.
val int64 : ?proj:('r -> int64) -> string -> ('r, int64) Col.t
int64 n
is an 64-bit integer column named n
.
val float : ?proj:('r -> float) -> string -> ('r, float) Col.t
float n
is a float column named n
.
val text : ?proj:('r -> string) -> string -> ('r, string) Col.t
text
is a text column named n
.
val blob : ?proj:('r -> string) -> string -> ('r, string) Col.t
blob
is a blob column named n
.
option t n
is a nullable t
column named n
.
t1
construct and deconstructs values with the given column. This redefines the projection to the identity.
t2
constructs and deconstructs pairs with the given column types. This redefine the projections of the columns.
t3
constructs and deconstructs triplets with the given column types. This redefine the projections of the columns.
t4
constructs and deconstructs quadruplets with the given column types. This redefine the projections of the columns.