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/Delta/index.html

Module Granary_ivm.DeltaSource

Lift row-mutation events into Z-set deltas (#417 Phase 3).

This is the bridge from a change feed (e.g. the engine's row-level delta feed, #419) to the incremental operators: an inserted element is +1, a deleted element is -1, and an update is the retraction of the old element plus the insertion of the new (-old +new) — so an update to an identical element is a no-op, and a sequence of events folds to a single Z-set delta.

Sourcetype 'elt event =
  1. | Insert of 'elt
    (*

    a row entered the relation

    *)
  2. | Delete of 'elt
    (*

    a row left the relation

    *)
  3. | Update of 'elt * 'elt
    (*

    a row changed: Update (old, new)

    *)

One change to a relation, over the element type a view ranges on (typically a projection of a stored row).

Sourcemodule Make (Z : Zset.S) : sig ... end

Make (Z) lifts events over Z.elt into Z.t deltas.