package sequoia

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

SQL tables.

Field definitions.

SQL field definitions.

type ('t, 'a) t = ..

The type of SQL fields. Can be extended by driver writers.

type t +=
  1. | Bool : string * 't Sequoia_table.t -> ('t, bool) t
  2. | Int : string * 't Sequoia_table.t -> ('t, int) t
  3. | Float : string * 't Sequoia_table.t -> ('t, float) t
  4. | String : string * 't Sequoia_table.t -> ('t, string) t
  5. | Blob : string * 't Sequoia_table.t -> ('t, bytes) t
    (*

    The basic SQL field types.

    *)
type ('t1, 't2) foreign_key = ('t1, int) t * ('t2, int) t

The type of foreign keys. They are a different type to allow enforcing of field relationships.

val name : ('t, 'a) t -> string

The name of a field.

val table : ('t, 'a) t -> 't Sequoia_table.t

The name of a field.

The table a field belongs to.

val to_string : ('t, 'a) t -> string

The table a field belongs to.

The string representation of a field, i.e. table.name.

val bool : 't Sequoia_table.t -> string -> ('t, bool) t

A boolean field.

val int : 't Sequoia_table.t -> string -> ('t, int) t

A boolean field.

An integer field.

val float : 't Sequoia_table.t -> string -> ('t, float) t

An integer field.

A float field.

val string : 't Sequoia_table.t -> string -> ('t, string) t

A float field.

A string field.

val blob : 't Sequoia_table.t -> string -> ('t, bytes) t

A string field.

A blob field.

val foreign_key : 't1 Sequoia_table.t -> string -> references:('t2, int) t -> ('t1, 't2) foreign_key

A foreign key referencing a field in another table.

module Null : sig ... end
OCaml

Innovation. Community. Security.