Type.Custom
Custom types.
Custom types allow DBMS backend to extend the set of base types defined by Rel
to support datatypes specific to the DBMS. To store encodings of OCaml values use Coded
types.
make ~name type'
is a custom column type with:
name
, the name of the custom type.type'
, the case that identifies the type.equal
, an equality function on the values of the type. Defaults to Stdlib.(=)
pp
, a pretty printer for the type values.doc
, a doc string for the custom type.val name : 'a t -> string
name c
is name of c
.
val doc : 'a t -> string
doc c
is the documentation string of c
.
val invalid_unknown : 'a t -> 'b
invalid_unknown c
raises Invalid_argument
indicating that the custom type c
is unknown and cannot be handled.