- Record Components:
name- the bound recursive relation name; must not be blankbase- the non-recursive seed relation; must not be nullstep- the recursive body (referencesnameviaRecursiveRefNode); must not be nulllocation- the source location of this node; never null
- All Implemented Interfaces:
RelNode
FIX.
FIX name (base, step) binds the recursive relation name over
the recursive body step. The base() is the non-recursive seed;
the step() is the recursive case, evaluated repeatedly with name
bound to the relation accumulated so far. Occurrences of name inside
step are represented by RecursiveRefNode leaves (the binder is
lexically scoped — name is visible only within step, never within
base or outside the FIX). The fixpoint is the union of base
with every step iterate, computed under set semantics (each round dedups
and a tuple already derived is never re-added), so the iteration terminates — even
over cyclic input data.
This is the WITH RECURSIVE / single-rule Datalog equivalent; binary
transitive closure (ClosureNode) is its two-column special case. The
operator materialises a set and never pushes down
to a source.
Surface syntax: FIX R (base, step) (keyword-only, no glyph).
-
Constructor Summary
ConstructorsConstructorDescriptionFixpointNode(String name, RelNode base, RelNode step) Convenience constructor for tests:SourceLocation.UNKNOWN.FixpointNode(String name, RelNode base, RelNode step, SourceLocation location) Creates an instance of aFixpointNoderecord class. -
Method Summary
Modifier and TypeMethodDescription<R> Raccept(RelNodeVisitor<R> visitor) base()Returns the value of thebaserecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.location()Returns the value of thelocationrecord component.name()Returns the value of thenamerecord component.step()Returns the value of thesteprecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.darkcollective.relix.ast.RelNode
children, mapChildren, materializationMode, prettyPrint
-
Constructor Details
-
FixpointNode
Creates an instance of aFixpointNoderecord class. -
FixpointNode
Convenience constructor for tests:SourceLocation.UNKNOWN.
-
-
Method Details
-
accept
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
base
Returns the value of thebaserecord component.- Returns:
- the value of the
baserecord component
-
step
Returns the value of thesteprecord component.- Returns:
- the value of the
steprecord component
-
location
Returns the value of thelocationrecord component.
-