Skip to content

Removing Upsert Listeners

Description

This topic describes two operations, that allow deleting all active listeners or only specific conditional listeners.

Conditional listeners can be deleted only if you specify the same whereClause condition that was used when this listener was initially created. For instance, if you initially registered a listener with the following whereClause where "age > 30", then you have to specify the same condition when calling the delete operation described in this topic.

Methods

Delete All Listeners

Delete Conditional Listeners

where:

Argument                Description
whereClause Optional parameter. String value. When a where clause condition is set in the invocation, the operation finds and deletes the event listener that was initially registered with the same where clause condition. For instance, if you initially registered a listener with the following whereClause where "age > 30", then you have to specify the same condition when calling the delete operation.

Return Value

None.

Examples

Delete All Listeners

The example below deletes all listeners registered in the "Person" data table.

Delete Conditional Listeners

The example below deletes all conditional listeners whose whereClause is set to "age > 30". Note that the whereClause in this operation acts differently compared to the generic use of the whereClause. In this context, he operation uses the whereClause condition as a target to delete all conditional listeners having the whereClause exactly set to "age > 30". In other words, considering this example,  it will not delete event listeners whose whereClause is set to "age > 31" and above.

Codeless Reference

rt_database_remove_listener_1

where:

Argument                Description
id Unique identifier of the event listener that must be deleted.

This operation does not return a value.

The example below registers a new upsert listener with the id``"1EFD-3GEF2-FF4C-AC21" , waits for 15000 milliseconds and deletes the event listener.

rt_database_remove_listener_2