Class OLiveQuery<T>
java.lang.Object
com.orientechnologies.orient.core.command.OCommandRequestAbstract
com.orientechnologies.orient.core.query.OQueryAbstract<T>
com.orientechnologies.orient.core.sql.query.OSQLQuery<T>
com.orientechnologies.orient.core.sql.query.OSQLAsynchQuery<T>
com.orientechnologies.orient.core.sql.query.OSQLSynchQuery<T>
com.orientechnologies.orient.core.sql.query.OLiveQuery<T>
- All Implemented Interfaces:
OCommandRequest,OCommandRequestAsynch,OCommandRequestInternal,OCommandRequestText,OCommandResultListener,OQuery<T>,Iterable<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.
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)
-
Field Summary
Fields inherited from class com.orientechnologies.orient.core.command.OCommandRequestAbstract
cacheableResult, context, fetchPlan, limit, parameters, progressListener, resultListener, timeoutMs, timeoutStrategy, useCache -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.orientechnologies.orient.core.sql.query.OSQLSynchQuery
end, getNextPageRID, getResult, isAsynchronous, isIdempotent, iterator, queryFromStream, queryToStream, reset, resetPagination, result, runMethods inherited from class com.orientechnologies.orient.core.sql.query.OSQLQuery
deserializeQueryParameters, fromStream, getText, runFirst, serializeQueryParameters, setText, toStream, toStringMethods inherited from class com.orientechnologies.orient.core.query.OQueryAbstract
getFetchPlan, setFetchPlanMethods inherited from class com.orientechnologies.orient.core.command.OCommandRequestAbstract
addExcludedNode, convertToParameters, getContext, getLimit, getParameters, getProgressListener, getResultListener, getTimeoutStrategy, getTimeoutTime, isCacheableResult, isRecordResultSet, isUseCache, removeExcludedNode, setCacheableResult, setContext, setLimit, setParameters, setProgressListener, setRecordResultSet, setResultListener, setTimeout, setUseCacheMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface com.orientechnologies.orient.core.command.OCommandRequest
getContext, getFetchPlan, getLimit, getTimeoutStrategy, getTimeoutTime, setContext, setFetchPlan, setLimit, setTimeout, setUseCacheMethods inherited from interface com.orientechnologies.orient.core.command.OCommandRequestAsynch
getResultListener, setResultListenerMethods inherited from interface com.orientechnologies.orient.core.command.OCommandRequestInternal
getParameters, getProgressListener, getResultListener, isCacheableResult, isRecordResultSet, setCacheableResult, setProgressListener, setRecordResultSet, setResultListener
-
Constructor Details
-
OLiveQuery
public OLiveQuery() -
OLiveQuery
-
-
Method Details
-
execute
- Specified by:
executein interfaceOCommandRequest- Overrides:
executein classOQueryAbstract<T>
-