Class OnDemandQuery
- java.lang.Object
-
- io.siddhi.query.api.execution.query.OnDemandQuery
-
- All Implemented Interfaces:
SiddhiElement,Serializable
public class OnDemandQuery extends Object implements SiddhiElement
This class keep information of on-demand query.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOnDemandQuery.OnDemandQueryTypeThis enum is used to identify the type of a on-demand query.
-
Constructor Summary
Constructors Constructor Description OnDemandQuery()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteBy(String outputTableId, Expression onDeletingExpression)Method to set a deleteStream as the outputStream of the on-demand querybooleanequals(Object o)OnDemandQueryfrom(InputStore inputStore)Builder method to set input store to the on-demand queryInputStoregetInputStore()Getter for the input storeOutputStreamgetOutputStream()Getter method to get the outputStream of the on-demand queryint[]getQueryContextEndIndex()int[]getQueryContextStartIndex()SelectorgetSelector()Getter method to get the selector of the on-demand queryOnDemandQuery.OnDemandQueryTypegetType()This method returns the type of given on-demand query.inthashCode()OnDemandQueryoutStream(OutputStream outputStream)Builder method to set an outPutStream to the on-demand querystatic OnDemandQueryquery()Builder method to get a new on-demand query instanceOnDemandQueryselect(Selector selector)Builder method to set a selector to the on-demand queryvoidsetQueryContextEndIndex(int[] lineAndColumn)voidsetQueryContextStartIndex(int[] lineAndColumn)voidsetType(OnDemandQuery.OnDemandQueryType type)This method sets the type of given on-demand query.StringtoString()voidupdateBy(String outputTableId, UpdateSet updateSetAttributes, Expression onUpdateExpression)Method to set an updateStream as the outputStream of the on-demand queryvoidupdateBy(String outputTableId, Expression onUpdateExpression)Method to set an updateStream as the outputStream of the on-demand queryvoidupdateOrInsertBy(String outputTableId, UpdateSet updateSetAttributes, Expression onUpdateExpression)Method to set an updateOrInsertStream as the outputStream of the on-demand query
-
-
-
Method Detail
-
query
public static OnDemandQuery query()
Builder method to get a new on-demand query instance- Returns:
- a new OnDemandQuery instance
-
from
public OnDemandQuery from(InputStore inputStore)
Builder method to set input store to the on-demand query- Parameters:
inputStore- inputStore for the on-demand query- Returns:
- updated on-demand query
-
getInputStore
public InputStore getInputStore()
Getter for the input store- Returns:
- inputStore
-
select
public OnDemandQuery select(Selector selector)
Builder method to set a selector to the on-demand query- Parameters:
selector- selector for the on-demand query- Returns:
- updated on-demand query
-
outStream
public OnDemandQuery outStream(OutputStream outputStream)
Builder method to set an outPutStream to the on-demand query- Parameters:
outputStream- outPutStream for the on-demand query- Returns:
- updated on-demand query
-
deleteBy
public void deleteBy(String outputTableId, Expression onDeletingExpression)
Method to set a deleteStream as the outputStream of the on-demand query- Parameters:
outputTableId- id of the table which is going to be queriedonDeletingExpression- expression for the delete operation defined in the on-demand query
-
updateBy
public void updateBy(String outputTableId, Expression onUpdateExpression)
Method to set an updateStream as the outputStream of the on-demand query- Parameters:
outputTableId- id of the table which is going to be queriedonUpdateExpression- expression for the update operation defined in the on-demand query
-
updateBy
public void updateBy(String outputTableId, UpdateSet updateSetAttributes, Expression onUpdateExpression)
Method to set an updateStream as the outputStream of the on-demand query- Parameters:
outputTableId- id of the table which is going to be queriedupdateSetAttributes- updateSet for the attributes which are going to be updated.onUpdateExpression- expression for the update operation defined in the on-demand query
-
updateOrInsertBy
public void updateOrInsertBy(String outputTableId, UpdateSet updateSetAttributes, Expression onUpdateExpression)
Method to set an updateOrInsertStream as the outputStream of the on-demand query- Parameters:
outputTableId- id of the table which is going to be queriedupdateSetAttributes- updateSet for the attributes which are going to be updated.onUpdateExpression- expression for the update or insert operation defined in the on-demand query
-
getSelector
public Selector getSelector()
Getter method to get the selector of the on-demand query- Returns:
- selector of the on-demand query
-
getOutputStream
public OutputStream getOutputStream()
Getter method to get the outputStream of the on-demand query- Returns:
- outputStream of the on-demand query
-
getQueryContextStartIndex
public int[] getQueryContextStartIndex()
- Specified by:
getQueryContextStartIndexin interfaceSiddhiElement
-
setQueryContextStartIndex
public void setQueryContextStartIndex(int[] lineAndColumn)
- Specified by:
setQueryContextStartIndexin interfaceSiddhiElement
-
getQueryContextEndIndex
public int[] getQueryContextEndIndex()
- Specified by:
getQueryContextEndIndexin interfaceSiddhiElement
-
setQueryContextEndIndex
public void setQueryContextEndIndex(int[] lineAndColumn)
- Specified by:
setQueryContextEndIndexin interfaceSiddhiElement
-
getType
public OnDemandQuery.OnDemandQueryType getType()
This method returns the type of given on-demand query.- Returns:
- type of given on-demand query
-
setType
public void setType(OnDemandQuery.OnDemandQueryType type)
This method sets the type of given on-demand query.
-
-