Class OLiveQuery<T>

All Implemented Interfaces:
OCommandRequest, OCommandRequestAsynch, OCommandRequestInternal, OCommandRequestText, OCommandResultListener, OQuery<T>, Iterable<T>

public class OLiveQuery<T> extends OSQLSynchQuery<T>
SQL live query.

The statement syntax is the same as a normal SQL SELECT statement, but with LIVE as prefix:

LIVE SELECT FROM Foo WHERE name = 'bar'

Executing this query, the caller will subscribe to receive changes happening in the database, that match this query condition. The query returns a query token in the result set. To unsubscribe, the user has to execute another live query with the following syntax:

LIVE UNSUBSCRIBE <token>

The callback passed as second parameter will be invoked every time a record is created/updated/deleted and it matches the query conditions.
Author:
Luigi Dell'Aquila (l.dellaquila-(at)-orientdb.com)