ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
WhereCircuit.h File Reference

Where-provenance circuit tracking column-level data origin. More...

#include <set>
#include <vector>
#include <utility>
#include "Circuit.hpp"
Include dependency graph for WhereCircuit.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  WhereCircuit
 Circuit encoding where-provenance (column-level data origin). More...
 
struct  WhereCircuit::Locator
 Describes the origin of a single attribute value. More...
 

Enumerations

enum class  WhereGate {
  UNDETERMINED , TIMES , PLUS , EQ ,
  PROJECT , IN
}
 Gate types for a where-provenance circuit. More...
 

Detailed Description

Where-provenance circuit tracking column-level data origin.

Where-provenance records not just which base tuples contributed to a query result, but also which attribute values in those base tuples gave rise to each output column.

WhereCircuit extends Circuit<WhereGate> with per-gate metadata that describes:

  • Input gates – the source table, row UUID, and number of columns.
  • Projection gates – the list of attribute positions being projected.
  • Equality gates – the pair of attribute positions being joined.

The evaluate() method traverses the circuit and returns, for each output position, a set of Locator values identifying the base (table, tuple, column) triples that the value was copied from.

Definition in file WhereCircuit.h.

Enumeration Type Documentation

◆ WhereGate

enum class WhereGate
strong

Gate types for a where-provenance circuit.

  • UNDETERMINED Placeholder; should not appear in a complete circuit.
  • TIMES Product (conjunction) of child where-provenance sets.
  • PLUS Sum (disjunction) of child where-provenance sets.
  • EQ Equijoin gate recording the joined attribute pair.
  • PROJECT Projection gate recording which attributes are kept.
  • IN Input gate for a single base-relation tuple.
Enumerator
UNDETERMINED 

Placeholder; should not appear in a complete circuit.

TIMES 

Product (conjunction) of child where-provenance sets.

PLUS 

Sum (disjunction) of child where-provenance sets.

EQ 

Equijoin gate recording the joined attribute pair.

PROJECT 

Projection gate recording which attributes are kept.

IN 

Input gate for a single base-relation tuple.

Definition at line 38 of file WhereCircuit.h.