Skip to main content

Module base_facts

Module base_facts 

Source
Expand description

Base fact extraction from a planned project.

Translates the project’s object graph into relational facts consumed by the Datalog fixed-point computation in super::datalog.

§Base Facts

Each base fact corresponds to a Datalog relation used by the propagation rules in super::datalog:

RelationSourceMeaning
ObjectInSchema(obj, db, sch)Project hierarchyObject obj lives in db.sch
DependsOn(child, parent)project.dependency_graphchild references parent in its query
StmtUsesCluster(obj, cluster)IN CLUSTER clause on main CREATEObject’s statement runs on cluster
IndexUsesCluster(obj, idx, cluster)IN CLUSTER clause on CREATE INDEXIndex idx on obj runs on cluster
ClusterBoundary(cluster)Evaluator-derived from cluster usage factsThe set of clusters eligible to become DirtyCluster
IsSink(obj)Statement::CreateSinkObject writes to an external system
IsReplacement(obj)Schema is in project.replacement_schemasObject uses in-place replacement protocol

ClusterBoundary is derived as the set of all clusters referenced by statements or indexes in the project.

Structs§

BaseFacts 🔒
Base facts extracted from the project for Datalog computation.

Functions§

extract_base_facts 🔒
Extract all base facts from the project for Datalog computation.