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

adonis-lucid-mongodb

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adonis-lucid-mongodb - npm Package Compare versions

Comparing version 1.0.29 to 1.0.30

2

package.json

@@ -8,3 +8,3 @@ {

},
"version": "1.0.29",
"version": "1.0.30",
"scripts": {

@@ -11,0 +11,0 @@ "lint": "standard",

@@ -8,3 +8,3 @@ # AdonisJS Lucid MongoDB

[![Build Status](https://travis-ci.org/duyluonglc/adonis-lucid-mongodb.svg?branch=develop)](https://travis-ci.org/duyluonglc/adonis-lucid-mongodb)
[![Coverage Status](https://img.shields.io/coveralls/duyluonglc/adonis-lucid-mongodb/master.svg?style=flat-square)](https://coveralls.io/github/duyluonglc/adonis-lucid-mongodb?branch=master)
[![Coverage Status](https://img.shields.io/coveralls/duyluonglc/adonis-lucid-mongodb/develop.svg?style=flat-square)](https://coveralls.io/github/duyluonglc/adonis-lucid-mongodb?branch=develop)
[![Downloads](https://img.shields.io/npm/dt/adonis-lucid-mongodb.svg?style=flat-square)](https://www.npmjs.com/package/adonis-lucid-mongodb)

@@ -42,3 +42,4 @@ > :pray: This repository is base on adonis-lucid. This package only work with mongodb.

// to query geo near you need declare field type as geometry and add 2d or 2dsphere index in migration file
const images = yield Image.({location: {near: {lat: 1, lng: 1}, maxDistance: 5}}).fetch()
const images = yield Image.({location: {near: {lat: 1, lng: 1}, maxDistance: 5000}}).fetch()
const images = yield Image.({location: {nearSphere: {lat: 1, lng: 1}, maxDistance: 500}}).fetch()
```

@@ -148,4 +149,2 @@ [More Documentation of mquery](https://github.com/aheckmann/mquery)

user
this.create('articles', (collection) => {

@@ -152,0 +151,0 @@ collection.index('title_index', {title: 1})

@@ -732,6 +732,2 @@ 'use strict'

_.forEach(conditions, (c, k) => {
if (!_.isFunction(target.modelQueryBuilder[k])) {
throw new CE.InvalidArgumentException(`Method "$${k}" is not support by query builder`)
}
if (k === 'near' || k === 'nearSphere') {

@@ -748,2 +744,4 @@ let point = {center: [c.lng, c.lat]}

target.modelQueryBuilder.where(key)[k](c)
} else {
throw new CE.InvalidArgumentException(`Method "$${k}" is not support by query builder`)
}

@@ -750,0 +748,0 @@ })

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