Query.Statement.executeWithBatchCallback()

Signature

void executeWithBatchCallback(String statementName, String listenerName, String callbackUri, boolean isContinuous, Object closure)

Domain

action

Description

Executes a query and binds a callback rule function to it.

Parameters

NameTypeDescription
statementNameStringname of the statement to execute.
listenerNameStringname of the listener to create.
callbackUriStringpath to the RuleFunction callback that will be called upon batch end, and execution end. The parameters of that RuleFunction must be:
  • String listenerName: name of the listener;
  • boolean isBatchEnd: true when called as a notification of batch end;
  • boolean hasEnded: true when called as a notification of end of execution;
  • Object rows: A array of all the rows that were produced in the batch. Each item in the array is an array of columns.
  • Object closure: the closure provided to executeWithBatchCallback.
isContinuousbooleantrue for the statement to be executed in continuous mode.
closureObjectthat will be blindly returned through a callback parameter.

Returns

None.

Cautions

Since the entire set of rows from a batch accumulate until the end of the batch, this method is not suitable for batches that produce a large number of rows in each batch.