java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,Object>
com.inductiveautomation.ignition.gateway.sqltags.history.query.processing.QueryContext
All Implemented Interfaces:
QueryController, Serializable, Cloneable, Map<String,Object>

public class QueryContext extends HashMap<String,Object> implements QueryController
The query context provides information about the overall query that might be useful to aggregation functions.
See Also:
  • Constructor Details

  • Method Details

    • getLogger

      public LoggerEx getLogger()
      This returns a logger that can be used to log information about processing.
    • logInfo

      public void logInfo(String message, Object... args)
    • logDebug

      public void logDebug(String message, Object... args)
    • logTrace

      public void logTrace(String message, Object... args)
    • getQueryId

      public String getQueryId()
      Specified by:
      getQueryId in interface QueryController
    • getBlockId

      public long getBlockId(long time)
      Description copied from interface: QueryController
      Returns which block the time belongs to. Generally, will be some multiple of the block window on top of the start time. There is one special case that we accommodate: seed values. Those belong to a block BEFORE the start time. For that reason, we calculate everything off of the start time, and not the block end.
      Specified by:
      getBlockId in interface QueryController
    • getBlockSize

      public long getBlockSize()
      Description copied from interface: QueryController
      Returns the size of the blocks in milliseconds. Will be 0 if the results should be raw data.
      Specified by:
      getBlockSize in interface QueryController
      Returns:
      time in milliseconds covered by each block.
    • getQueryStart

      public long getQueryStart()
      Specified by:
      getQueryStart in interface QueryController
    • getQueryEnd

      public long getQueryEnd()
      Specified by:
      getQueryEnd in interface QueryController
    • getQueryParameters

      public TagHistoryQueryParams getQueryParameters()
      Description copied from interface: QueryController
      The parameters for the current query.
      Specified by:
      getQueryParameters in interface QueryController