Module Rel_query.Syntax

Query syntax support.

Open this module to streamline query definition.

type nonrec 'a value = 'a value
module Bool = Bool
module Int = Int
module Int64 = Int64
module Float = Float
module Text = Text
module Option = Option
module Bag = Bag

Boolean operators

val (&&) : bool value -> bool value -> bool value

( && ) is Bool.(&&).

val (||) : bool value -> bool value -> bool value

( || ) is Bool.(||).

val not : bool value -> bool value

not is Bool.not.

Integer operators

val (~-) : int value -> int value

~-x is the negation of x.

val (+) : int value -> int value -> int value

x + y is integer addition.

val (-) : int value -> int value -> int value

x + y is integer subtraction.

val (*) : int value -> int value -> int value

x * y is integer addition.

val (/) : int value -> int value -> int value

x / y is integer division.

Float operators

val (~-.) : float value -> float value

~-.x is the floating point negation of x.

val (+.) : float value -> float value -> float value

x +. y is floating point addition.

val (-.) : float value -> float value -> float value

x +. y is floating point subtraction.

val (*.) : float value -> float value -> float value

x *. y is floating point addition.

val (/.) : float value -> float value -> float value

x *. y is floating point division.

Row operators

val ($) : ('a -> 'b) value -> 'a value -> 'b value

f $ v applies v to row constructor f.

val (#.) : 'r value -> ('r, 'a) Rel.Col.t -> 'a value

r #. c projects r on column c.

Bag operators

val (++) : ('a, 'e) Bag.t -> ('a, 'e) Bag.t -> ('a, 'e) Bag.t

b0 ++ b1 is the union of bag b0 and bag b1.

Enumeration

val let* : ('a, _) Bag.t -> ('a value -> ('b, 'e) Bag.t) -> ('b, 'e) Bag.t

let* binds bag values for Bag.foreach.