Module sql::query_model::attribute::core[][src]

Expand description

Framework for modeling and computing derived attributes for QGM graphs.

A derived attribute is a value that is associated with a specific QGM box and can be derived from a QGM graph and other derived attributes.

To implement a new attribute, define a new type to represent that attribute and implement the Attribute and AttributeKey for that type.

Note that the current implementation does not support parameterized Attribute instances, so MyAttr is OK, but MyAttr(i32) isn’t.

Structs

Helper struct to derive a TypeMapKey from an Attribute.

A container for derived attributes associated with a specific QGM box.

Traits

A trait that defines the logic for deriving an attribute.

A trait sets an attribute Value type.

Functions

Consumes a set of attributes and produces a topologically sorted version of the elements in that set based on the dependency information provided by the Attribute::requires results.

derive attributes for the entire model before each transform

Compute the attributes required to derive the given set of attributes that are not already in that set.

Compute the transitive closure of the given set of attributes.