new QueryResult()
- Description:
Represents a
baja:QueryResultin BajaScript.A QueryResult can be resolved from a NEQL query.
- Source:
Members
(static) DEFAULT :baja.coll.QueryResult
- Description:
Default
QueryResultinstance.
- Source:
Default QueryResult instance.
Type:
Methods
cursor(obj) → {Promise}
- Description:
Iterate through a QueryResult's Entities.
Please note, this may retrieve data asynchronously.
A callback function is passed in to retrieve the Cursor.
- Source:
- See:
Example
myQueryResult.cursor({
each: function () {
// Called for each Entity in the Cursor...
var dataFromCursor = this.get();
}
})
.then(function (cursor) {
// Called once we have the Cursor
})
.catch(function (err) {
// Called if any errors in getting data
});
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
obj |
Object | function | the object literal that specifies the method's Properties
|
Returns:
a promise that will be resolved once the cursor has been
retrieved.
- Type
- Promise
getQuery() → {String}
- Description:
Return the Query string for the result.
- Source:
Returns:
The Query.
- Type
- String
getScopeOrd() → {baja.Ord}
- Description:
Return the Scope ORD for the result.
- Source:
Returns:
The Scope ORD.
- Type
- baja.Ord