Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mquery

Package Overview
Dependencies
Maintainers
2
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mquery - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

5

History.md
0.2.7 / 2013-08-2
==================
* Now support GeoJSON point values for Query#near
0.2.6 / 2013-07-30

@@ -3,0 +8,0 @@ ==================

43

lib/mquery.js

@@ -374,3 +374,3 @@ 'use strict';

* @memberOf Query
* @param {String} path
* @param {String} [path]
* @param {Number} val

@@ -387,3 +387,3 @@ * @api public

* @memberOf Query
* @param {String} path
* @param {String} [path]
* @param {Number} val

@@ -400,3 +400,3 @@ * @api public

* @memberOf Query
* @param {String} path
* @param {String} [path]
* @param {Number} val

@@ -413,3 +413,3 @@ * @api public

* @memberOf Query
* @param {String} path
* @param {String} [path]
* @param {Number} val

@@ -426,3 +426,3 @@ * @api public

* @memberOf Query
* @param {String} path
* @param {String} [path]
* @param {Number} val

@@ -439,3 +439,3 @@ * @api public

* @memberOf Query
* @param {String} path
* @param {String} [path]
* @param {Number} val

@@ -452,3 +452,3 @@ * @api public

* @memberOf Query
* @param {String} path
* @param {String} [path]
* @param {Number} val

@@ -465,3 +465,3 @@ * @api public

* @memberOf Query
* @param {String} path
* @param {String} [path]
* @param {Number} val

@@ -478,3 +478,3 @@ * @api public

* @memberOf Query
* @param {String} path
* @param {String} [path]
* @param {Number} val

@@ -491,3 +491,3 @@ * @api public

* @memberOf Query
* @param {String} path
* @param {String} [path]
* @param {Number} val

@@ -504,3 +504,3 @@ * @api public

* @memberOf Query
* @param {String} path
* @param {String} [path]
* @param {Number} val

@@ -538,3 +538,3 @@ * @api public

*
* @param {String} path
* @param {String} [path]
* @param {Number} val

@@ -583,3 +583,3 @@ * @return {Query} this

*
* @param {String} path
* @param {String} [path]
* @param {Number} val

@@ -695,2 +695,6 @@ * @return {Query} this

*
* ####NOTE:
*
* Must be used after `where()`.
*
* @memberOf Query

@@ -902,2 +906,3 @@ * @return {Query} this

var type = val.spherical

@@ -907,3 +912,11 @@ ? '$nearSphere'

conds[type] = val.center;
if (Array.isArray(val.center)) {
conds[type] = val.center;
} else {
if (!val.center.type && val.center.type == 'Point'
|| !val.center.coordinates) {
throw new Error(util.format("Invalid GeoJSON specified for %s", type));
}
conds[type] = { $geometry : val.center };
}

@@ -1100,3 +1113,3 @@ var radius = 'maxDistance' in val

*
* @param {String} path
* @param {String} [path]
* @param {Number} val number/range of elements to slice

@@ -1103,0 +1116,0 @@ * @return {Query} this

{
"name": "mquery",
"version": "0.2.6",
"version": "0.2.7",
"description": "Expressive query building for MongoDB",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -621,3 +621,3 @@ #mquery

Sets a `$within` argument for geo-spatial queries
Sets a `$geoWithin` or `$within` argument for geo-spatial queries.

@@ -638,2 +638,6 @@ ```js

As of mquery 2.0, `$geoWithin` is used by default. This impacts you if running MongoDB < 2.4. To alter this behavior, see [mquery.use$geoWithin](#mqueryusegeowithin).
**Must** be used after `where()`.
[MongoDB Documentation](http://docs.mongodb.org/manual/reference/operator/geoWithin/)

@@ -878,3 +882,3 @@

Internally uses `Query.canMerge` to determine validity.
Internally uses `mquery.canMerge` to determine validity.

@@ -906,3 +910,3 @@ ###setOptions(options)

###Query.canMerge(conditions)
###mquery.canMerge(conditions)

@@ -919,2 +923,12 @@ Determines if `conditions` can be merged using `mquery().merge()`.

##mquery.use$geoWithin
MongoDB 2.4 introduced the `$geoWithin` operator which replaces and is 100% backward compatible with `$within`. As of mquery 0.2, we default to using `$geoWithin` for all `within()` calls.
If you are running MongoDB < 2.4 this will be problematic. To force `mquery` to be backward compatible and always use `$within`, set the `mquery.use$geoWithin` flag to `false`.
```js
mquery.use$geoWithin = false;
```
##Custom Base Queries

@@ -921,0 +935,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc