package caqti
Module Caqti_type.StdSource
Standard type descriptors provided as a submodule for easy inclusion.
Composite
The following provides constructors for narrow tuple types; to describe wider tuple types, use nested application.
A holding no fields. This is used to pass no parameters and as the result for queries which does not return any rows. It can also be nested in tuples, in which case it will not contribute to the total number of fields.
val custom :
encode:('a -> ('b, string) result) ->
decode:('b -> ('a, string) result) ->
'b t ->
'a tcustom ~encode ~decode rep creates a custom type represented by rep, where encode is used to encode parameters into rep and decode is used to decode result rows from rep.
Note. This should be considered experimental and may be revised or removed in a future version.
Singular
An UTF-8 string. The database should accept UTF-8 if non-ASCII characters are present.
An absolute time with driver-dependent precision. This corresponds to an SQL timestamp type with UTC time zone.
A period of time. If the database lacks a dedicated representation, the integer number of seconds is used.