Package org.yamcs.yarch.streamsql
Interface StreamSqlStatement
-
- All Known Implementing Classes:
AlterSequenceStatement,CloseStreamStatement,CreateInputStreamStatement,CreateOutputStreamStatement,CreateStreamStatement,CreateTableStatement,DeleteStatement,DescribeStatement,DropTableStatement,InsertStatement,MergeStatement,SelectTableStatement,ShowDatabasesStatement,ShowEnginesStatement,ShowSequencesStatement,ShowStreamsStatement,ShowStreamStatement,ShowTablesStatement,SimpleStreamSqlStatement,UpdateTableStatement
public interface StreamSqlStatementTag interface for all StreamSQL statements. The execute method locks the dictionary for the period of execution.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description StreamSqlResultexecute(ExecutionContext context)Execute query and return a result.default voidexecute(ExecutionContext context, ResultListener resultListener)Execute query and send the results to the result listener.voidexecute(ExecutionContext context, ResultListener resultListener, long limit)Execute query and limit the number of results returned.
-
-
-
Method Detail
-
execute
void execute(ExecutionContext context, ResultListener resultListener, long limit) throws StreamSqlException
Execute query and limit the number of results returned.Note that the update/delete/drop table queries that return one row are executed even if the limit is 0. The output however is suppressed when the limit is set to 0.
- Parameters:
context-resultListener-limit-- Throws:
StreamSqlException
-
execute
default void execute(ExecutionContext context, ResultListener resultListener) throws StreamSqlException
Execute query and send the results to the result listener.- Parameters:
context-resultListener-- Throws:
StreamSqlException
-
execute
StreamSqlResult execute(ExecutionContext context) throws StreamSqlException
Execute query and return a result. The result can be closed at any time.- Parameters:
context-- Returns:
- Throws:
StreamSqlException
-
-