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

ee-query-builder

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ee-query-builder - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

53

lib/QueryBuilder.js

@@ -96,14 +96,16 @@ !function(){

// postgres cannot limit deletes, we have to build a subselect
log(query);
SQLString += ' WHERE CTID IN (' + this._render('query', {
select : [function() {return {keyWord: 'CTID'};}]
, from : query.from
, database : query.database
, filter : query.filter
, join : query.join
, order : query.order
, group : query.group
, limit : query.limit
, offset : query.offset
}, parameters).SQLString+')';
// we need to render a subquery for every selected field (primary key)
SQLString += ' WHERE ' + query.select.map(function(column) {
return this._escapeId(query.from)+'.'+this._escapeId(column)+' IN('+this._render('query', {
select : [column]
, from : query.from
, database : query.database
, filter : query.filter
, join : query.join
, order : query.order
, group : query.group
, limit : query.limit
, offset : query.offset
}, parameters).SQLString+')'
}.bind(this)).join(' AND ');
}

@@ -174,14 +176,17 @@ else {

// postgres cannot limit updates, we have to build a subselect
log(query);
SQLString += ' WHERE CTID IN (' + this._render('query', {
select : [function() {return {keyWord: 'CTID'};}]
, from : query.from
, database : query.database
, filter : query.filter
, join : query.join
, order : query.order
, group : query.group
, limit : query.limit
, offset : query.offset
}, parameters).SQLString+')';
// we need to render a subquery for every selected field (primary key)
SQLString += ' WHERE ' + query.select.map(function(column) {
return this._escapeId(query.from)+'.'+this._escapeId(column)+' IN('+this._render('query', {
select : [column]
, from : query.from
, database : query.database
, filter : query.filter
, join : query.join
, order : query.order
, group : query.group
, limit : query.limit
, offset : query.offset
}, parameters).SQLString+')'
}.bind(this)).join(' AND ');
}

@@ -188,0 +193,0 @@ else {

{
"name" : "ee-query-builder"
, "description" : "query builder for ee-orm"
, "version" : "0.2.0"
, "version" : "0.2.1"
, "homepage" : "https://github.com/eventEmitter/ee-query-builder"

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

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