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

sql-query

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sql-query - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

13

lib/Select.js

@@ -100,2 +100,15 @@ var Where = require("./Where");

},
whereExists: function (table, table_link, link, conditions) {
var where = [{
t: (sql.from.length ? sql.from[sql.from.length - 1].a : null),
w: conditions,
e: { t: table, tl: get_table_alias(table_link), l: link }
}];
if (sql.where.length) {
sql.where[sql.where.length - 1] = sql.where[sql.where.length - 1].concat(where);
} else {
sql.where.push(where);
}
return this;
},
offset: function (offset) {

@@ -102,0 +115,0 @@ sql.offset = offset;

@@ -26,2 +26,13 @@ exports.build = function (Dialect, where) {

for (var i = 0; i < where.length; i++) {
if (where[i].e) {
// EXISTS
query.push(
"EXISTS (" +
"SELECT * FROM " + Dialect.escapeId(where[i].e.t) + " " +
"WHERE " + Dialect.escapeId(where[i].e.l[0]) + " = " + Dialect.escapeId(where[i].e.tl, where[i].e.l[1]) + " " +
"AND " + buildOrGroup(Dialect, [{ t: null, w: where[i].w }]) +
")"
);
continue;
}
for (var k in where[i].w) {

@@ -28,0 +39,0 @@ if (where[i].w[k] === null) {

2

package.json

@@ -9,3 +9,3 @@ {

],
"version": "0.0.11",
"version": "0.0.12",
"license": "MIT",

@@ -12,0 +12,0 @@ "repository": {

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