Legend:
Library
Module
Module type
Parameter
Class
Class type
Type descriptors for fields and tuples.
Primitive Field Types
The following is normally only needed for drivers and to define new field types. Everything needed for common usage is covered in Row Types.
type'a field = ..
An extensible type describing primitive SQL types and types which can be converted to and from such types. When adding a new constructor, register the coding with Field.define_coding if possible. Otherwise, the type will only work with drivers which handle it themselves. The shipped drivers only handle the constructors listed here.
Note. The concrete representation of this type should be considered private, including pattern-matching usage; use the below functions for compatibility with future versions.
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 tup4 : 'at->'bt->'ct->'dt->('a * 'b * 'c * 'd)t
Creates a 4-tuple type.
val custom :
encode:('a->('b, string)Stdlib.result)->decode:('b->('a, string)Stdlib.result)->'bt->'at
custom ~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.