Constructor.
the collection which this ResultSet will query against
Allows sorting a ResultSet based on multiple columns.
array of property names or subarray of [propertyname, isdesc] used evaluate sort order
Reference to this ResultSet, sorted, for future chain operations.
To support reuse of ResultSet in branched query situations.
Returns a copy of the ResultSet (set) but the underlying document references will be the same.
Returns the number of documents in the ResultSet.
The number of documents in the ResultSet.
Terminates the chain and returns array of filtered documents
Array of documents in the ResultSet
Left joining two sets of data. Join keys can be defined or calculated properties eqJoin expects the right join key values to be unique. Otherwise left data will be joined on the last joinData object with that key
Data array to join to.
Property name in this result set to join on or a function to produce a value to join on
Property name in the joinData to join on or a function to produce a value to join on
A ResultSet with data in the format [{left: leftObj, right: rightObj}]
Used for querying via a mongo-style query object.
A mongo-style query object used for filtering current results.
(Optional) Used by collection.findOne() - flag if this was invoked via findOne()
this ResultSet for further chain ops.
Oversee the operation of AND'ed query expressions. AND'ed expression evaluation runs each expression progressively against the full collection, internally utilizing existing chained ResultSet functionality. Only the first filter can utilize a binary index.
this ResultSet for further chain ops.
Oversee the operation of OR'ed query expressions. OR'ed expression evaluation runs each expression individually against the full collection, and finally does a set OR on each expression's results. Each evaluation can utilize a binary index to prevent multiple linear array scans.
this ResultSet for further chain ops.
Returns the scoring of the last full-text-search.
Allows you to limit the number of documents passed to next chain operation. A ResultSet copy() is made to avoid altering original ResultSet.
The number of documents to return.
Returns a copy of the ResultSet, limited by qty, for subsequent chain ops.
Applies a map function into a new collection for further chaining.
javascript map function
data transformation via user supplied functions
this function accepts a single document for you to transform and return
this function accepts many (array of map outputs) and returns single value
The output of your reduceFunction
Used for skipping 'pos' number of documents in the ResultSet.
Number of documents to skip; all preceding documents are filtered out.
Returns a copy of the ResultSet, containing docs starting at 'pos' for subsequent chain ops.
Removes all document objects which are currently in ResultSet from collection (as well as ResultSet)
this (empty) ResultSet for further chain ops.
Reset the ResultSet to its initial state.
Reference to this ResultSet, for future chain operations.
Simpler, loose evaluation for user to sort based on a property name. (chainable). Sorting based on the same lt/gt helper functions used for binary indices.
name of property to sort by.
boolean for sort descending or options object
Reference to this ResultSet, sorted, for future chain operations.
Sorts the ResultSet based on the last full-text-search scoring.
Override of toJSON to avoid circular references
Executes a named collection transform or raw array of transform steps against the ResultSet.
name of collection transform or raw transform array
either (this) ResultSet or a clone of of this ResultSet (depending on steps)
Used for filtering via a javascript filter function.
A javascript function used for filtering current results by.
this ResultSet for further chain ops.
Generated using TypeDoc
ResultSet class allowing chainable queries. Intended to be instanced internally. Collection.find(), Collection.where(), and Collection.chain() instantiate this.
mycollection.chain() .find({ 'doors' : 4 }) .where(function(obj) { return obj.name === 'Toyota' }) .data();
the data type
nested properties of data type