Rel_query.Bag
Bags specification language.
Bags are multisets of values (rows).
TODO
Bag.row
we could likely get to a scheme where we work directly with Rel.Row
in the language (for now we only work with Rel.Col
) which should help SQL execution boilerplate. What happens to higher-order ?type unordered = unit order
The type for unordered.
The type for bags, multisets of values o type 'a
and an effect 'e
that can be applied on it.
val empty : ('a, 'e) t
empty
is the empty bag.
val table : 'a Rel.Table.t -> ('a, unordered) t
table t
is a table from t
.
foreach b f
are the values of b
mapped by f
and unioned.
where c e
is the bag e ()
if b
whenever c
is true
.
val pp : Stdlib.Format.formatter -> ('a, _) t -> unit
XXX. Fundamentaly this has nothing to do here.
val row : ('a -> 'r) -> ('a -> 'r) value
val inj : 'a -> 'a value
val const : 'a Rel.Type.t -> 'a -> 'a value