package caqti
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4c84a16d983d0fed2786f536a3fa4d8fa113b8b30b4deea4a74772582d5489b2
md5=42a2e2d3b73d7fbaecc618549aad2865
doc/caqti.v1/Caqti1_sigs/module-type-PARAM/index.html
Module type Caqti1_sigs.PARAM
Parameter encoding functions.
val null : tA designated value to replace a missing parameter. For SQL, null is NULL.
val bool : bool -> tConstructs a boolean parameter. If the database does not have booleans, an integer value of 0 for false and 1 for true is used.
val int : int -> tConstructs an integer parameter. The remote end may have a different range. For SQL, works with all integer types.
val int32 : int32 -> tConstructs an integer parameter. The remote end may have a different range. For SQL, works with all integer types.
val int64 : int64 -> tConstructs an integer parameter. The remote end may have a different range. For SQL, works with all integer types.
val float : float -> tConstructs a floating point parameter. Note that the precision in the database may be different from that of the OCaml float. If conversion to string is requried by the backend, this is done with the %.*g format specifier, which may incur a small loss of precision, as well.
val string : string -> tGiven an UTF-8 encoded text, constructs a textual parameter with backend-specific encoding.
val bytes : bytes -> tConstructs a parameter from an arbirary octet string. For SQL, the parameter is compatible with the BINARY type.
val date_string : string -> tConstruct a date paramater from a string using ISO 8601 format.
val date_tuple : (int * int * int) -> tConstruct a date parameter from the year, month, and day of the month, using the literal enumeration. I.e. Epoch is (1970, 1, 1).
val date_cl : CalendarLib.Date.t -> tConstruct a parameter representing a date.
val utc_float : float -> tConstruct a parameter representing date and time in the UTC time zone, converted from a float representing the number of non-leap seconds passed since 1970-01-01T00:00:00Z.
val utc_string : string -> tCreate a parameter for an UTC timestamp field from a UTC time string in ISO 8601 format.
val utc_cl : CalendarLib.Calendar.t -> tConstruct a parameter representing an date and time in the UTC time zone.