public abstract class AbstractQueryableRecordTable extends AbstractRecordTable implements QueryableProcessor
ComplexEventChunk
so that
developer can directly work with event data.Modifier and Type | Class and Description |
---|---|
class |
AbstractQueryableRecordTable.OrderByAttributeBuilder
Holder of order by attribute with order orientation
|
class |
AbstractQueryableRecordTable.SelectAttributeBuilder
Holder of Selection attribute with renaming field
|
AbstractRecordTable.RecordStoreCompiledCondition
recordTableHandler, storeEventPool
tableDefinition
Constructor and Description |
---|
AbstractQueryableRecordTable() |
Modifier and Type | Method and Description |
---|---|
protected abstract CompiledSelection |
compileSelection(List<AbstractQueryableRecordTable.SelectAttributeBuilder> selectAttributeBuilders,
List<ExpressionBuilder> groupByExpressionBuilder,
ExpressionBuilder havingExpressionBuilder,
List<AbstractQueryableRecordTable.OrderByAttributeBuilder> orderByAttributeBuilders,
Long limit,
Long offset)
Compile the query selection
|
CompiledSelection |
compileSelection(io.siddhi.query.api.execution.query.selection.Selector selector,
List<io.siddhi.query.api.definition.Attribute> expectedOutputAttributes,
MatchingMetaInfoHolder matchingMetaInfoHolder,
List<VariableExpressionExecutor> variableExpressionExecutors,
Map<String,Table> tableMap,
SiddhiQueryContext siddhiQueryContext)
To construct a selection having the capability of transforming events based on given selection logic.
|
protected abstract RecordIterator<Object[]> |
query(Map<String,Object> parameterMap,
CompiledCondition compiledCondition,
CompiledSelection compiledSelection,
io.siddhi.query.api.definition.Attribute[] outputAttributes)
Query records matching the compiled condition and selection
|
StreamEvent |
query(StateEvent matchingEvent,
CompiledCondition compiledCondition,
CompiledSelection compiledSelection)
To find events from the processor event pool, that the matches the matchingEvent based on finder logic and
return them based on the defined selection.
|
StreamEvent |
query(StateEvent matchingEvent,
CompiledCondition compiledCondition,
CompiledSelection compiledSelection,
io.siddhi.query.api.definition.Attribute[] outputAttributes)
To find events from the processor event pool, that the matches the matchingEvent based on finder logic and
return them based on the defined selection.
|
add, add, compileCondition, compileCondition, compileSetAttribute, compileUpdateSet, contains, contains, delete, delete, find, find, getTableDefinition, init, init, update, update, updateOrAdd, updateOrAdd
addEvents, connect, connectWithRetry, containsEvent, deleteEvents, destroy, disconnect, find, getHandler, initTable, shutdown, updateEvents, updateOrAddEvents
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compileCondition, find
public StreamEvent query(StateEvent matchingEvent, CompiledCondition compiledCondition, CompiledSelection compiledSelection) throws ConnectionUnavailableException
QueryableProcessor
query
in interface QueryableProcessor
matchingEvent
- the event to be matched with the events at the processorcompiledCondition
- the execution element responsible for matching the corresponding events that matches
the matchingEvent based on pool of events at ProcessorcompiledSelection
- the execution element responsible for transforming the corresponding events to the
given selectionConnectionUnavailableException
public StreamEvent query(StateEvent matchingEvent, CompiledCondition compiledCondition, CompiledSelection compiledSelection, io.siddhi.query.api.definition.Attribute[] outputAttributes) throws ConnectionUnavailableException
QueryableProcessor
query
in interface QueryableProcessor
matchingEvent
- the event to be matched with the events at the processorcompiledCondition
- the execution element responsible for matching the corresponding events that matches
the matchingEvent based on pool of events at ProcessorcompiledSelection
- the execution element responsible for transforming the corresponding events to the
given selectionoutputAttributes
- the output attributes specified in the query.ConnectionUnavailableException
protected abstract RecordIterator<Object[]> query(Map<String,Object> parameterMap, CompiledCondition compiledCondition, CompiledSelection compiledSelection, io.siddhi.query.api.definition.Attribute[] outputAttributes) throws ConnectionUnavailableException
parameterMap
- map of matching StreamVariable Ids and their values
corresponding to the compiled condition and selectioncompiledCondition
- the compiledCondition against which records should be matchedcompiledSelection
- the compiledSelection that maps records based to requested formatConnectionUnavailableException
public CompiledSelection compileSelection(io.siddhi.query.api.execution.query.selection.Selector selector, List<io.siddhi.query.api.definition.Attribute> expectedOutputAttributes, MatchingMetaInfoHolder matchingMetaInfoHolder, List<VariableExpressionExecutor> variableExpressionExecutors, Map<String,Table> tableMap, SiddhiQueryContext siddhiQueryContext)
QueryableProcessor
compileSelection
in interface QueryableProcessor
selector
- the query selectormatchingMetaInfoHolder
- the meta structure of the incoming matchingEventvariableExpressionExecutors
- the list of variable ExpressionExecutors already createdtableMap
- map of event tablessiddhiQueryContext
- current siddhi query contextprotected abstract CompiledSelection compileSelection(List<AbstractQueryableRecordTable.SelectAttributeBuilder> selectAttributeBuilders, List<ExpressionBuilder> groupByExpressionBuilder, ExpressionBuilder havingExpressionBuilder, List<AbstractQueryableRecordTable.OrderByAttributeBuilder> orderByAttributeBuilders, Long limit, Long offset)
selectAttributeBuilders
- helps visiting the select attributes in ordergroupByExpressionBuilder
- helps visiting the group by attributes in orderhavingExpressionBuilder
- helps visiting the having conditionorderByAttributeBuilders
- helps visiting the order by attributes in orderlimit
- defines the limit leveloffset
- defines the offset levelCopyright © 2019. All rights reserved.