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 0.10.1 to 0.10.2

2

package.json

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

},
"version": "0.10.1",
"version": "0.10.2",
"scripts": {

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

@@ -261,3 +261,23 @@ 'use strict'

const relations = _.isArray(arguments[0]) ? arguments[0] : _.toArray(arguments)
target.eagerLoad.with(relations)
relations.forEach(item => {
console.log(item)
if (_.isObject(item)) {
target.eagerLoad.with([item.relation])
if (item.scope) {
if (_.isObject(item.scope)) {
this.scope(item.relation, function (query) {
if (item.scope.where) { query = query.where(item.scope.where) }
if (item.scope.with) { query = query.with(item.scope.with) }
if (item.scope.limit) { query = query.limit(item.scope.limit) }
if (item.scope.skip) { query = query.skip(item.scope.skip) }
if (item.scope.sort) { query = query.sort(item.scope.sort) }
})
} else if (item) {
this.scope(item.relation, item.scope)
}
}
} else {
target.eagerLoad.with([item])
}
})
return this

@@ -264,0 +284,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