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.25 to 0.0.26

4

lib/Where.js

@@ -93,4 +93,4 @@ exports.build = function (Dialect, where) {

switch (op) {
case "eq" : op = "="; break;
case "ne" : op = "<>"; break;
case "eq" : op = (where.w[k].val === null ? "IS" : "="); break;
case "ne" : op = (where.w[k].val === null ? "IS NOT" : "<>"); break;
case "gt" : op = ">"; break;

@@ -97,0 +97,0 @@ case "gte" : op = ">="; break;

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

],
"version": "0.0.25",
"version": "0.0.26",
"license": "MIT",

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

@@ -30,2 +30,12 @@ var common = require('../common');

assert.equal(
common.Select().from('table1').where({ col: common.Query.eq(null) }).build(),
"SELECT * FROM `table1` WHERE `col` IS NULL"
);
assert.equal(
common.Select().from('table1').where({ col: common.Query.ne(null) }).build(),
"SELECT * FROM `table1` WHERE `col` IS NOT NULL"
);
assert.equal(
common.Select().from('table1').where({ col: undefined }).build(),

@@ -32,0 +42,0 @@ "SELECT * FROM `table1` WHERE `col` IS NULL"

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