Class QueryContext
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>
The query context provides information about the overall query that might be useful to aggregation functions.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
getBlockId
(long time) Returns which block the time belongs to.long
Returns the size of the blocks in milliseconds.This returns a logger that can be used to log information about processing.long
The parameters for the current query.long
void
void
void
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
QueryContext
-
-
Method Details
-
getLogger
This returns a logger that can be used to log information about processing. -
logInfo
-
logDebug
-
logTrace
-
getQueryId
- Specified by:
getQueryId
in interfaceQueryController
-
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 interfaceQueryController
-
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 interfaceQueryController
- Returns:
- time in milliseconds covered by each block.
-
getQueryStart
public long getQueryStart()- Specified by:
getQueryStart
in interfaceQueryController
-
getQueryEnd
public long getQueryEnd()- Specified by:
getQueryEnd
in interfaceQueryController
-
getQueryParameters
Description copied from interface:QueryController
The parameters for the current query.- Specified by:
getQueryParameters
in interfaceQueryController
-