Comparing version 0.1.3 to 0.1.4
@@ -173,3 +173,3 @@ (function () { | ||
/** | ||
* Returns a Mingo.Cursor object for iterating over the results of the query | ||
* Performs a query on a collection and returns a cursor object. | ||
* @param collection | ||
@@ -471,3 +471,3 @@ * @param projection | ||
/** | ||
* Return a cursor for the given query criteria and options | ||
* Performs a query on a collection and returns a cursor object. | ||
* @param collection | ||
@@ -474,0 +474,0 @@ * @param criteria |
{ | ||
"name": "mingo", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "JavaScript implementation of MongoDB query language", | ||
@@ -5,0 +5,0 @@ "main": "mingo.js", |
@@ -46,6 +46,6 @@ # Mingo | ||
// shorthand | ||
var result = Mingo.find(collection, { | ||
type: "homework", | ||
score: { $gte: 50 } | ||
}); | ||
query = Mingo.compile({ | ||
type: "homework", | ||
score: { $gte: 50 } | ||
}); | ||
``` | ||
@@ -58,2 +58,5 @@ | ||
// could also be | ||
// cursor = Mingo.find(collection, criteria); | ||
// sort, skip and limit by chaining | ||
@@ -126,3 +129,3 @@ cursor.sort({student_id: 1, score: -1}) | ||
- ```test(obj)``` Returns true if the object passes the query criteria, otherwise false. | ||
- ```find(collection, [projection])``` Returns a ```Mingo.Cursor``` for iterating over the results of the query | ||
- ```find(collection, [projection])``` Performs a query on a collection and returns a ```Mingo.Cursor``` object. | ||
- ```remove(collection)``` Remove matching documents from the collection and return the remainder | ||
@@ -153,10 +156,10 @@ | ||
A mixin object for ```Backbone.Collection``` which adds ```query()``` and ```aggregate()``` methods | ||
- ```query(criteria)``` | ||
- ```aggregate(expressions)``` | ||
- ```query(criteria)``` Performs a query on the collection and returns a ```Mingo.Cursor``` object. | ||
- ```aggregate(expressions)``` Performs aggregation operation using the aggregation pipeline. | ||
### Mingo.compile(criteria) | ||
Returns a ```Mingo.Query``` given the criteria | ||
Returns a ```Mingo.Query``` with the given criteria | ||
### Mingo.find(collection, criteria) | ||
Returns a ```Mingo.Cursor``` for a ```Mingo.Query``` with the given criteria | ||
### Mingo.find(collection, criteria, projection) | ||
Performs a query on a collection and returns a ```Mingo.Cursor``` object. | ||
@@ -167,3 +170,3 @@ ### Mingo.remove(collection, criteria) | ||
### Mingo.aggregate(collection, expressions) | ||
Returns the result of executing the aggregate expressions over the collection | ||
Performs aggregation operation using the aggregation pipeline. | ||
@@ -170,0 +173,0 @@ # TODO |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67849
174