Record Class NativeQueryContext

java.lang.Object
java.lang.Record
com.inductiveautomation.historian.gateway.api.query.NativeQueryContext
Record Components:
directives - the directive for each key the engine computes natively; a key without one has none.
livePostSeeds - the live post bound of each key that has one.
legacyCompatible - whether every key of the batch runs the classic tag history calculation of a legacy compatible engine; such keys carry no directive.

public record NativeQueryContext(Map<AggregatedQueryKey, EngineDirective> directives, Map<AggregatedQueryKey, SeedResults.SeedValue<?>> livePostSeeds, boolean legacyCompatible) extends Record
Pipeline-supplied context for one aggregated query computed natively by an engine: the directive for each key, the live post bound of each key that has one, and whether the batch runs the classic tag history calculation. Passed alongside the caller's options; direct engine callers pass NONE.

An engine uses a live post bound wherever its own statement reads the key's sample after the range, and only where it finds no stored sample, of any level, there. The pipeline has already decided each one applies; the engine adds no rule of its own.

  • Field Details

    • NONE

      public static final NativeQueryContext NONE
      No directives and no live post bounds.
  • Constructor Details

  • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • directives

      public Map<AggregatedQueryKey, EngineDirective> directives()
      Returns the value of the directives record component.
      Returns:
      the value of the directives record component
    • livePostSeeds

      public Map<AggregatedQueryKey, SeedResults.SeedValue<?>> livePostSeeds()
      Returns the value of the livePostSeeds record component.
      Returns:
      the value of the livePostSeeds record component
    • legacyCompatible

      public boolean legacyCompatible()
      Returns the value of the legacyCompatible record component.
      Returns:
      the value of the legacyCompatible record component