🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

firebird-query

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firebird-query - npm Package Compare versions

Comparing version

to
0.7.4

7

lib/cjs/index.js

@@ -61,3 +61,3 @@ "use strict";

};
const isSingleUndefinedValue = (obj) => Object.values(obj).length === 1 && Object.values(obj)[0] === undefined;
const isSingleUndefinedValue = (obj) => (Object.values(obj).length === 1 && Object.values(obj)[0] === undefined);
const defaultCondition = (clause) => clause === "AND" ? "1=1" : "1=0";

@@ -138,2 +138,5 @@ const isWhereObject = (val) => typeof val === "object" && !Array.isArray(val) && !(val instanceof Date);

const param = params[i];
if (param === null) {
return cur + node_firebird_1.default.escape(null);
}
if (isWhereObject(param)) {

@@ -206,3 +209,3 @@ const conditions = param;

const columnsStr = columns.join(", ");
const escapedValues = columns.map((key) => escape(rowValues[key]));
const escapedValues = columns.map((key) => node_firebird_1.default.escape(rowValues[key]));
const valuesStr = escapedValues.join(", ");

@@ -209,0 +212,0 @@ let query = `UPDATE OR INSERT INTO ${tableName} (${columnsStr}) VALUES (${valuesStr})`;

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

"license": "MIT",
"version": "0.7.3",
"version": "0.7.4",
"description": "node-firebird plugin for easy and safe query building.",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet