package sequoia

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

Expressions that are valid in SELECT queries.

type 's select = 's t
type Sequoia_expr.t +=
  1. | Field : ('t, 'a) Sequoia_field.t * 's1 source * ('s1, 't1, 't, 's2) steps -> 'a Sequoia_expr.t
  2. | Foreign : ('t, 't2) Sequoia_field.foreign_key * 's1 source * ('s1, 't1, 't, 's2) steps -> 'a Sequoia_expr.t
  3. | Select : 's select -> 'a Sequoia_expr.t
    (*

    Extend basic expressions with field and foreign key references and subqueries.

    *)
type 'a t = 'a Sequoia_expr.t
val (-->) : ('s source -> 'a t) -> string -> 's source -> 'a t

Define an alias for an expression (i.e. the SQL AS keyword).

val alias : string -> 's source -> 'a t

Reference a previously defined alias. Note: alias references are not type-safe!

val field : ('t, 'a) Sequoia_field.t -> ('b, 'c, 't, 'd) steps -> 'b source -> 'a t

A field expression.

val foreign_key : ('t1, 't2) Sequoia_field.foreign_key -> ('a, 'b, 't1, 'c) steps -> 'a source -> 'd t

A foreign key expression.

val subquery : 's select -> 't source -> 'c t

A subquery expression.

val unwrap : ('t, 'a option) Sequoia_field.t -> ('b, 'c, 't, 'd) steps -> 'b source -> 'a t

Convert a nullable field to an expression of the non-null type.

type ('s, 'a) mk = 's source -> 'a t

An expression builder, i.e. a function that returns an expression when given a source.

module Vector : Sequoia_vector.S with type ('s, 'a) elem := ('s, 'a) mk

Vectors of expression builders.

Functions useful for driver writers

Build an expression.

val vectormk_to_vector : 's source -> ('s, 'a, 'n) Vector.t -> ('s, 'a, 'n) Sequoia_expr.Vector.t

Convert a vector of expression builders into a vector of expressions when given a source.

OCaml

Innovation. Community. Security.