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

ee-orm

Package Overview
Dependencies
Maintainers
2
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ee-orm - npm Package Compare versions

Comparing version 0.3.34 to 0.3.35

1

lib/Query.js

@@ -19,2 +19,3 @@ !function(){

this.group = options.group || [];
this.order = options.order || [];
}

@@ -21,0 +22,0 @@

@@ -192,3 +192,7 @@ !function(){

if (debug) log.info('preparing childResource for ordering «'+childResource.name.yellow+'», selected: '+((!!childResource.selected)+'').yellow+', hasRootFilter: '+((!!childResource.hasRootFilter)+'').yellow+', filtered: '+((!!childResource.filtered)+'').yellow+'');
if (childResource.isRootOrdered) childResource.rootOrder();
if (childResource.isRootOrdered) {
// go up the tree and left join all required tables
this._orderByChildren(resource);
childResource.rootOrder();
}

@@ -201,3 +205,10 @@ this._preparechildResourceForOrdering(childResource);

, _orderByChildren: function(resource) {
if (resource.parentResource) {
resource.joinRoot(true);
this._orderByChildren(resource.parentResource);
}
}
, _filterByChildren: function(resource, joins, filter, resourceName) {

@@ -204,0 +215,0 @@ if (!resource.selected) {

@@ -165,2 +165,14 @@ !function(){

, joinRoot: function(leftJoin) {
this.joins.reverse().forEach(function(joinStatement, index){
if (!joinStatement.used) {
joinStatement.used = true;
this.rootResource.query.join.push(joinStatement.reverseFormat(this.id, (index > 0 ? this.id: this.parentResource.id), leftJoin));
}
}.bind(this));
}
, selectReferencedColumn: function(columnName) {

@@ -167,0 +179,0 @@ this.query.select.push(columnName);

2

package.json
{
"name" : "ee-orm"
, "description" : "An easy to use ORM for node.js. Supports eager loading, complex queries, joins, transactions, complex database clusters & connection pooling."
, "version" : "0.3.34"
, "version" : "0.3.35"
, "homepage" : "https://github.com/eventEmitter/ee-orm"

@@ -6,0 +6,0 @@ , "author" : "Michael van der Weg <michael@eventemitter.com> (http://eventemitter.com/)"

@@ -28,8 +28,3 @@

var query = db.event(['*']);
query.getVenue(['*']);
query.getVenue(['*'], {id: ORM.or([1,2,3,4])});
query.getVenue(['*'], {name: ORM.like('Da%')});
query.find(cb);
db.event(['*']).getVenue(['*']).orderRoot('id').find(cb);
return;

@@ -36,0 +31,0 @@

@@ -517,2 +517,6 @@

});
it('should order the rootquery using a child resource', function(done) {
db.event(['*']).getVenue(['*']).orderRoot('id').find(expect('[{"id":3,"venue":{"id":1,"name":"Dachstock Reitschule"},"title":"Mapping Test","startdate":"1970-01-01T00:00:00.000Z","enddate":null,"canceled":true},{"id":4,"venue":{"id":1,"name":"Dachstock Reitschule"},"title":"Changed title","startdate":"1970-01-01T00:00:00.000Z","enddate":"2014-05-13T16:53:20.000Z","canceled":null},{"id":1,"venue":{"id":2,"name":"Dachstock Reitschule"},"title":"Changed title","startdate":"1970-01-01T00:00:00.000Z","enddate":null,"canceled":null},{"id":2,"venue":{"id":2,"name":"Dachstock Reitschule"},"title":"Mapping Test","startdate":"1970-01-01T00:00:00.000Z","enddate":null,"canceled":null}]', done));
});
});

@@ -519,0 +523,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