package sequoia

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

Literal values.

Expressions.

Expressions that (supposedly) exist on every SQL implementation. Everything else is left to be implemented in drivers.

type 'a t = ..

The type of expressions. It is extended by the query modules (i.e. Sequoia_select, Sequoia_insert, etc.) to account for expressions that are only valid for the respective query types.

type 'a cast = ..

The type of expressions. It is extended by the query modules (i.e. Sequoia_select, Sequoia_insert, etc.) to account for expressions that are only valid for the respective query types.

The type that represents an SQL CAST().

module Base : sig ... end

Module Base defines the basic SQL expressions.

Useful values for driver writers

type handover = {
  1. expr : 'a. Sequoia_common.build_step -> 'a t -> Sequoia_common.build_step;
  2. cast : 'b. 'b cast -> string;
}

These are functions that allow an expression to be "handed over" to another function when they're being built. The handover type makes it possible to recursively build expressions that can contain driver-specific constructors.

val build : placeholder:(int -> string) -> handover:handover -> Sequoia_common.build_step -> 'a t -> Sequoia_common.build_step

Build an expression.

val build_function : placeholder:(int -> string) -> handover:handover -> Sequoia_common.build_step -> string -> 'a t list -> string -> Sequoia_common.build_step

Build an expression that corresponds to an SQL function.

val string_of_cast : ?handover:('a cast -> string) -> 'a cast -> string

Convert a CAST expression to a string representation.

type ('a, 'b) expr = 'b t
module Vector : Sequoia_vector.S with type ('a, 'b) elem := ('a, 'b) expr

A module for vectors of expressions.

OCaml

Innovation. Community. Security.