Abstract
The owning EntityManager of this query
The result class of this query
Readonly
entityThe owning EntityManager of this query
Readonly
resultThe result class of this query
Static
Readonly
MAX_Abstract
addAbstract
addAbstract
addAbstract
countExecute the query that returns the matching objects count.
The total number of matched objects
Optional
doneCallback: CountCallbackCalled when the operation succeed.
Optional
failCallback: FailCallbackCalled when there is a server-side error
Abstract
eventReturns an observable that receives change events for a real-time query
Multiple subscriptions can be created on top of this observable:
var query = DB.Todo.find();
var options = { ... };
var stream = query.eventStream(options);
var sub = stream.subscribe(onNext, onError, onComplete);
var otherSub = stream.subscribe(otherOnNext, otherOnError, otherOnComplete);
an observable
Optional
options: EventStreamOptionsoptions to narrow down the events you will receive
Returns a subscription that handles change events for a real-time query.
The underlying stream object is hidden. To create multiple subscriptions on the same stream, create the stream object first and then subscribe to the stream (see the other signature #eventStream(options)).
a real-time query subscription
Optional
options: EventStreamOptionsoptions to narrow down the events you will receive
Optional
onNext: NextEventCallback<T>Called when an event is received
Optional
onError: FailCallbackCalled when there is a server-side error
Optional
onComplete: CompleteCallbackCalled when the network connection is closed (e.g. because of lost Wi-Fi connection)
Returns a subscription that handles change events for a real-time query.
The underlying stream object is hidden. To create multiple subscriptions on the same stream, create the stream object first and then subscribe to the stream (see the other signature #eventStream(options)).
a real-time query subscription
Optional
onNext: NextEventCallback<T>Called when an event is received
Optional
onError: FailCallbackCalled when there is a server-side error
Optional
onComplete: CompleteCallbackCalled when the network connection is closed (e.g. because of lost Wi-Fi connection)
Sets the limit of this query, i.e hox many objects should be returnd
The resulting Query
http://docs.mongodb.org/manual/reference/method/cursor.limit/
The limit of this query
Sets the offset of the query, i.e. how many elements should be skipped
The resulting Query
http://docs.mongodb.org/manual/reference/method/cursor.skip/
The offset of this query
Abstract
resultExecute the query and return the query results as a List
Note: All local unsaved changes on matching objects, will be discarded.
A promise that will be resolved with the query result as a list
Optional
options: ResultOptionsThe query options
Optional
doneCallback: ResultListCallback<T>Called when the operation succeed.
Optional
failCallback: FailCallbackCalled when the operation failed.
Execute the query and return the query results as a List
Note: All local unsaved changes on matching objects, will be discarded.
A promise that will be resolved with the query result as a list
Optional
doneCallback: ResultListCallback<T>Called when the operation succeed.
Optional
failCallback: FailCallbackCalled when the operation failed.
Abstract
resultReturns an observable that receives the complete real-time query result
The full result is received initially (i.e. on subscription) and on every change.
var query = DB.Todo.find();
var stream = query.resultStream();
var sub = stream.subscribe(onNext, onError, onComplete);
var otherSub = stream.subscribe(otherOnNext, otherOnError, otherOnComplete);
an observable on which multiple subscriptions can be created on
Optional
options: ResultStreamOptionsadditional options
Returns a subscription that handles the complete real-time query result
The full result is received initially (i.e. on subscription) and on every change.
The underlying stream object is hidden. To create multiple subscriptions on the same stream, create the stream object first and then subscribe to the stream (see the other signature #resultStream(options)).
a real-time query subscription handling complete query results.
Optional
options: ResultStreamOptionsadditional options
Optional
onNext: NextResultCallback<T>Called when the query result changes in any way
Optional
onError: FailCallbackCalled when there is a server-side error
Optional
onComplete: CompleteCallbackCalled when the network connection is closed (e.g. because of network timeout or lost Wi-Fi connection) and the specified number of reconnects have been exhausted; will never be called when infinite reconnects are configured (default)
Returns a subscription that handles the complete real-time query result
The full result is received initially (i.e. on subscription) and on every change.
The underlying stream object is hidden. To create multiple subscriptions on the same stream, create the stream object first and then subscribe to the stream (see the other signature #resultStream(options)).
As the real-time query will reconnect infinitely often, there is no onComplete callback. (In other words, the observable will never complete.)
a real-time query subscription handling complete query results.
Optional
onNext: NextResultCallback<T>Called when the query result changes in any way
Optional
onError: FailCallbackCalled when there is a server-side error
Optional
onComplete: CompleteCallbackCalled when the network connection is closed (e.g. because of network timeout or lost Wi-Fi connection) and the specified number of reconnects have been exhausted; will never be called when infinite reconnects are configured (default)
Abstract
singleExecute the query that returns a single result
Note: All local unsaved changes on the matched object, will be discarded.
A promise that will be resolved with the query result as a single result
Optional
options: ResultOptionsThe query options
Optional
doneCallback: SingleResultCallback<T>Called when the operation succeed.
Optional
failCallback: FailCallbackCalled when the operation failed.
Execute the query that returns a single result
Note: All local unsaved changes on the matched object, will be discarded.
A promise that will be resolved with the query result as a single result
Optional
doneCallback: SingleResultCallback<T>Called when the operation succeed.
Optional
failCallback: FailCallbackCalled when the operation failed.
Sets the sort of the query and discard all existing paramaters
The resulting Query
http://docs.mongodb.org/manual/reference/method/cursor.sort/
The new sort of the query which is an object whose keys are fields and the values are either +1 for ascending order or -1 for descending order
Generated using TypeDoc
An abstract Query which allows retrieving results