Class ErroredQueryExecutor
- java.lang.Object
-
- com.inductiveautomation.ignition.gateway.sqltags.history.query.ErroredQueryExecutor
-
- All Implemented Interfaces:
HistoryQueryExecutor
public class ErroredQueryExecutor extends java.lang.Object implements HistoryQueryExecutor
-
-
Constructor Summary
Constructors Constructor Description ErroredQueryExecutor()
ErroredQueryExecutor(java.util.List<ColumnQueryDefinition> columns)
ErroredQueryExecutor(java.util.List<ColumnQueryDefinition> columns, QualityCode code)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addErroredColumn(ColumnQueryDefinition column)
void
addErroredColumn(ColumnQueryDefinition column, QualityCode code)
void
addErroredColumns(java.util.List<ColumnQueryDefinition> columns)
void
addErroredColumns(java.util.List<ColumnQueryDefinition> columns, QualityCode code)
void
endReading()
If startReading was called, this function must be called (that is, it should be in a finally block).java.util.List<HistoryNode>
getColumnNodes()
Returns the HistoryNodes of this executor.int
getEffectiveWindowSizeMS()
When "natural" results are requested, this will be called to let the query executors say what they think "natural" means.boolean
hasMore()
Returns TRUE if there is more data available to be written on call to processData()void
initialize()
Initializes the query, performing any actions necessary to get the information required to run the query.long
nextTime()
The timestamp of the next value.long
processData()
Puts the next value(s) into the appropriate column, returning the latest timestamp loaded, or -1 if no data was loaded.void
startReading()
Begins reading data.
-
-
-
Constructor Detail
-
ErroredQueryExecutor
public ErroredQueryExecutor()
-
ErroredQueryExecutor
public ErroredQueryExecutor(java.util.List<ColumnQueryDefinition> columns)
-
ErroredQueryExecutor
public ErroredQueryExecutor(java.util.List<ColumnQueryDefinition> columns, QualityCode code)
-
-
Method Detail
-
addErroredColumns
public void addErroredColumns(java.util.List<ColumnQueryDefinition> columns)
-
addErroredColumns
public void addErroredColumns(java.util.List<ColumnQueryDefinition> columns, QualityCode code)
-
addErroredColumn
public void addErroredColumn(ColumnQueryDefinition column)
-
addErroredColumn
public void addErroredColumn(ColumnQueryDefinition column, QualityCode code)
-
getColumnNodes
public java.util.List<HistoryNode> getColumnNodes()
Description copied from interface:HistoryQueryExecutor
Returns the HistoryNodes of this executor. There MUST be one for every tag path, and they must be in the same order as the paths provided to the executor when it was created. Also, these values must be available as soon as the executor is created. However, they won't be consulted for their data type until after initialize is called, so the normal procedure is to create and returnDelegatingHistoryNode
s, which get filled in later.- Specified by:
getColumnNodes
in interfaceHistoryQueryExecutor
-
initialize
public void initialize() throws java.lang.Exception
Description copied from interface:HistoryQueryExecutor
Initializes the query, performing any actions necessary to get the information required to run the query.- Specified by:
initialize
in interfaceHistoryQueryExecutor
- Throws:
java.lang.Exception
-
getEffectiveWindowSizeMS
public int getEffectiveWindowSizeMS()
Description copied from interface:HistoryQueryExecutor
When "natural" results are requested, this will be called to let the query executors say what they think "natural" means. If a query executor does not support natural results, it should return -1. If all of the query executors return -1, a raw query will be performed.- Specified by:
getEffectiveWindowSizeMS
in interfaceHistoryQueryExecutor
-
startReading
public void startReading() throws java.lang.Exception
Description copied from interface:HistoryQueryExecutor
Begins reading data. IMPORTANT: endReading should always be called at some point after calling startReading.- Specified by:
startReading
in interfaceHistoryQueryExecutor
- Throws:
java.lang.Exception
-
endReading
public void endReading()
Description copied from interface:HistoryQueryExecutor
If startReading was called, this function must be called (that is, it should be in a finally block).- Specified by:
endReading
in interfaceHistoryQueryExecutor
-
hasMore
public boolean hasMore()
Description copied from interface:HistoryQueryExecutor
Returns TRUE if there is more data available to be written on call to processData()- Specified by:
hasMore
in interfaceHistoryQueryExecutor
-
nextTime
public long nextTime()
Description copied from interface:HistoryQueryExecutor
The timestamp of the next value. -1 if no value is available.- Specified by:
nextTime
in interfaceHistoryQueryExecutor
-
processData
public long processData() throws java.lang.Exception
Description copied from interface:HistoryQueryExecutor
Puts the next value(s) into the appropriate column, returning the latest timestamp loaded, or -1 if no data was loaded.- Specified by:
processData
in interfaceHistoryQueryExecutor
- Throws:
java.lang.Exception
-
-