Socket
Socket
Sign inDemoInstall

sql

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sql - npm Package Compare versions

Comparing version 0.43.0 to 0.43.1

18

lib/node/where.js

@@ -15,9 +15,13 @@ 'use strict';

node.forEach(function (subNode) {
if (!result) {
result = subNode;
} else {
result = result.and(subNode);
}
});
if (node.length === 0) {
result = new TextNode('(1 = 1)');
} else {
node.forEach(function (subNode) {
if (!result) {
result = subNode;
} else {
result = result.and(subNode);
}
});
}
}

@@ -24,0 +28,0 @@ else if (!node.toNode && typeof node === 'object'){

@@ -5,3 +5,3 @@ {

"description": "sql builder",
"version": "0.43.0",
"version": "0.43.1",
"homepage": "https://github.com/brianc/node-sql",

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

@@ -55,2 +55,19 @@ 'use strict';

params: []
});
Harness.test({
query: user.where([]),
pg: {
text : 'SELECT * FROM "user" WHERE (1 = 1)',
string: 'SELECT * FROM "user" WHERE (1 = 1)'
},
mysql: {
text : 'SELECT * FROM `user` WHERE (1 = 1)',
string: 'SELECT * FROM `user` WHERE (1 = 1)'
},
sqlite: {
text : 'SELECT * FROM "user" WHERE (1 = 1)',
string: 'SELECT * FROM "user" WHERE (1 = 1)'
},
params: []
});
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