search: keywords: ['java', 'olivequeryresultlistener', 'live query', 'onUpdate']
OLiveQueryResultListener - onUpdate()
Executes when records are updated in a Live Query.
Live Queries
In OrientDB, a Live Query is composed of a query that defines the records you want to monitor and a listener that controls what your application does in the event of changes to those records. Using this method, you can define what happens when an UPDATE
statement is run affecting the Live Query result-set.
Syntax
void OLiveQueryResultListener().onUpdate(
ODatabaseDocument db,
OResult before,
OResult after)
Argument | Type | Description |
---|---|---|
db | ODatabaseDocument | Provides the database in which the Live Query executes |
before | OResult | Provides the data as it existed before the change |
after | OResult | Provides the data as it exists after the change |