Record Class PushdownFunctions

java.lang.Object
java.lang.Record
com.darkcollective.relix.plan.internal.PushdownFunctions
Record Components:
catalog - the functions a call resolves in; never null
context - the run's ambient state, holding its pinned clock — null when the planner was not told it, in which case nothing is substituted and the renderers behave as they did before substitution existed

public record PushdownFunctions(FunctionCatalog catalog, FunctionContext context) extends Record
What a renderer needs to know about functions: which ones exist, and — for the ones that are constant for a run — what this run's ambient state says they are.

The two travel together because the second is useless without the first and is wanted in exactly the place the first already reaches: the arm that renders a call. Carrying the context as a further parameter would thread it through every recursive step of two expression renderers to be read in two of them.

  • Constructor Details

    • PushdownFunctions

      public PushdownFunctions(FunctionCatalog catalog, FunctionContext context)
      Creates an instance of a PushdownFunctions record class.
      Parameters:
      catalog - the value for the catalog record component
      context - the value for the context record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • catalog

      public FunctionCatalog catalog()
      Returns the value of the catalog record component.
      Returns:
      the value of the catalog record component
    • context

      public FunctionContext context()
      Returns the value of the context record component.
      Returns:
      the value of the context record component