adonis-lucid-mongodb
Advanced tools
Comparing version 1.0.31 to 1.0.32
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "1.0.31", | ||
"version": "1.0.32", | ||
"scripts": { | ||
@@ -11,0 +11,0 @@ "lint": "standard", |
@@ -718,3 +718,5 @@ 'use strict' | ||
'intersects', | ||
'regex' | ||
'regex', | ||
'maxDistance', | ||
'minDistance' | ||
] | ||
@@ -741,5 +743,10 @@ _.forEach(arguments[0], (conditions, key) => { | ||
} | ||
target.modelQueryBuilder.where(key)['near'](point) | ||
if (conditions.minDistance) { | ||
point.minDistance = conditions.minDistance | ||
} | ||
target.modelQueryBuilder.where(key).near(point) | ||
} else if (_(supportMethods).includes(k)) { | ||
target.modelQueryBuilder.where(key)[k](c) | ||
if (k !== 'maxDistance' && k !== 'minDistance') { | ||
target.modelQueryBuilder.where(key)[k](c) | ||
} | ||
} else { | ||
@@ -746,0 +753,0 @@ throw new CE.InvalidArgumentException(`Method "$${k}" is not support by query builder`) |
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
235948
8349