Module Ask.Type

Column base types.

Base types

type 'a t = ..

The type for column types represented by value of type 'a in OCaml.

type t +=
| Bool : bool t(*

Stored as 0 and 1

*)
| Int : int t(*

Stored as int64

*)
| Int64 : int64 t
| Float : float t
| Text : string t
| Blob : string t
| Option : 'a t -> 'a option t(*

Nullable type.

*)

Base types supported by all database backends.

Coded types

Types coded by other types. Provides arbitrary OCaml column types. Don't be too fancy if you expect other, non OCaml-based, systems to access the database.

module Coded : sig ... end

Coded types.

type t +=
| Coded : ('a'b) Coded.t -> 'a t

The types for a column coding values of type 'a as values of type 'b.

Invalid types

val invalid_unknown : unit -> 'a

invalid_unknown () raises Invalid_argument indicating that the type is unknown.

val invalid_nested_option : unit -> 'a

invalid_nested_option raises Invalid_argument indicating that nested option types are not supported.

Formatters

val pp : Stdlib.Format.formatter -> 'a t -> unit

pp ppf t formats an unspecified representation of t on ppf. Raises Invalid_argument if t is unknown to the module.

val value_pp : 'a t -> Stdlib.Format.formatter -> 'a -> unit

value_pp t is a formatter for value of type t. Raises Invalid_argument if t is unknown to the module.