Package org.yamcs.yarch.streamsql
Class DeleteStatement
- java.lang.Object
-
- org.yamcs.yarch.streamsql.SimpleStreamSqlStatement
-
- org.yamcs.yarch.streamsql.DeleteStatement
-
- All Implemented Interfaces:
StreamSqlStatement
public class DeleteStatement extends SimpleStreamSqlStatement
Execute a statement:delete from <table> where <cond> limit n
The query returns a tuple containing the number of inspected and deleted rows.Note that rocksdb does not remove the data from the disk immediately. The freeing of the space will only happen when a compact operation will be executed on the files which have removed data inside. See Rocksdb Compaction for details.
-
-
Constructor Summary
Constructors Constructor Description DeleteStatement(String tableName, Expression whereClause, long limit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidexecute(ExecutionContext context, Consumer<Tuple> consumer)protected TupleDefinitiongetResultDefinition()-
Methods inherited from class org.yamcs.yarch.streamsql.SimpleStreamSqlStatement
execute, execute
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.yamcs.yarch.streamsql.StreamSqlStatement
execute
-
-
-
-
Constructor Detail
-
DeleteStatement
public DeleteStatement(String tableName, Expression whereClause, long limit)
-
-
Method Detail
-
execute
protected void execute(ExecutionContext context, Consumer<Tuple> consumer) throws StreamSqlException
- Specified by:
executein classSimpleStreamSqlStatement- Throws:
StreamSqlException
-
getResultDefinition
protected TupleDefinition getResultDefinition()
- Overrides:
getResultDefinitionin classSimpleStreamSqlStatement
-
-