package granary

  1. Overview
  2. Docs
Pure-OCaml SQL engine

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.0.3.tar.gz
sha256=8b18780ea373be48301d9f333925860a2f9110fc0ac28684295118d72b65a67e
sha512=25ca3c9c5e2b528704a542502e0f37dc33ba003f65622d969b8c2b800778585f8ef0cf89b36e6679832e3993e8303aecddfc662742baf7044d6afe4a796b8f11

doc/granary.ivm/Granary_ivm/Zset/index.html

Module Granary_ivm.ZsetSource

Z-sets — the core data structure of DBSP-style incremental computation (#417 Phase 1).

A Z-set over a domain is a finitely-supported map from elements to signed integer weights: an element present with weight +1 is "in the set once", +n "n times", and a negative weight is a retraction. Inserts and deletes from the row-level delta feed (#419) lift to a Z-set delta (Inserted+1, Deleted-1), and the incremental operators (Phase 2) are functions over Z-sets that commute with add, so a view is maintained by applying operators to the input delta rather than recomputing.

A Z-set is kept canonical: an element with total weight 0 is never stored, so two Z-sets are equal iff they have the same elements with the same nonzero weights.

Sourcemodule type ELEMENT = sig ... end

The element domain of a Z-set: a totally ordered, printable type.

Sourcemodule type S = sig ... end

The operations a Z-set supports.

Sourcemodule Make (E : ELEMENT) : S with type elt = E.t

Make (E) builds a Z-set module over element domain E.