Module Ask.Syntax

Query syntax support.

Open this module to streamline query definition.

module Type = Type
module Col = Col
module Row = Row
module Index = Index
module Table = Table
module Bool = Bool
module Int = Int
module Int64 = Int64
module Float = Float
module Text = Text
module Option = Option
module Bag = Bag
module Sql = Sql

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) 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 foreach.