Sublimate (Sublimate v0.1.0)
Copy MarkdownSublimate is a helper library that builds database trigger logic for incremental updates to a destination table.
The data source can be a single source table or multiple joined tables. Changes to any of the source tables are staged to a deltas table. A merge function can then be applied - on demand or at scheduled intervals - to copy the changes to the destination table.
Sublimate maintains the destination table incrementally as the source changes; the consumer application/library defines what the destination contains and how staged changes merge into it.
One example of a consuming library is Refine ➚, which keeps a facets table up to date with changes in source tables.
Building blocks
Projection
The engine that builds and runs the infrastructure (deltas table, triggers) that keeps the destination table synchronized with its source tables, without knowing anything about the table's contents.
Projection-specific decisions are delegated to the projection's strategy (see below).
See: Sublimate.Projection
Strategy
The implementation of a specific projection. By implementing Sublimate.ProjectionStrategy
callback functions, the consuming application/library instructs the projection how to keep
the destination table synchronized.
See: Sublimate.ProjectionStrategy
Projection data
The attributes the projection operates on: the strategy module, and normalized and validated table and trigger references.
Entry points
install/3sets up a projectionuninstall/2tears down the projectionmerge/2applies staged changes to the destination table
See: Sublimate.Projection