The owning EntityManager of this query
The result class of this query
Readonly
entityThe owning EntityManager of this query
The offset how many results should be skipped
Readonly
maxThe limit how many objects should be returned
The properties which should be used sort the result
Readonly
resultThe result class of this query
Static
Readonly
MAX_Execute 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
Private
createPrivate
createReturns 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: EventStreamOptions | NextEventCallback<T>options to narrow down the events you will receive
Optional
onNext: FailCallback | NextEventCallback<T>Called when an event is received
Optional
onError: FailCallback | CompleteCallbackCalled 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
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
options: ResultOptions | ResultListCallback<T>The query options
Optional
doneCallback: FailCallback | ResultListCallback<T>Called when the operation succeed.
Optional
failCallback: FailCallbackCalled when the operation failed.
Returns 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: ResultStreamOptions | NextResultCallback<T>additional options
Optional
onNext: FailCallback | NextResultCallback<T>Called when the query result changes in any way
Optional
onError: FailCallback | CompleteCallbackCalled 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)
Private
serializePrivate
serializeExecute 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: ResultOptions | SingleResultCallback<T>The query options
Optional
doneCallback: FailCallback | 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
A Query Node saves the state of the query being built