New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.1.6 to 0.1.7

3

lib/Comparators.js
exports.between = function (a, b) {
return createSpecialObject({ from: a, to: b }, 'between');
};
exports.not_between = function (a, b) {
return createSpecialObject({ from: a, to: b }, 'not_between');
};
exports.like = function (expr) {

@@ -5,0 +8,0 @@ return createSpecialObject({ expr: expr }, 'like');

@@ -90,2 +90,11 @@ exports.build = function (Dialect, where) {

break;
case "not_between":
query.push(
buildComparisonKey(Dialect, where.t, k) +
" NOT BETWEEN " +
Dialect.escapeVal(where.w[k].from) +
" AND " +
Dialect.escapeVal(where.w[k].to)
);
break;
case "like":

@@ -92,0 +101,0 @@ query.push(

2

package.json

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

],
"version": "0.1.6",
"version": "0.1.7",
"license": "MIT",

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

@@ -144,2 +144,7 @@ var common = require('../common');

assert.equal(
common.Select().from('table1').where({ col: common.Query.not_between('a', 'b') }).build(),
"SELECT * FROM `table1` WHERE `col` NOT BETWEEN 'a' AND 'b'"
);
assert.equal(
common.Select().from('table1').where({ col: common.Query.like('abc') }).build(),

@@ -146,0 +151,0 @@ "SELECT * FROM `table1` WHERE `col` LIKE 'abc'"

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