node-sql-parser
Advanced tools
Comparing version 1.6.3 to 1.6.4
@@ -33,3 +33,3 @@ "use strict"; | ||
sqlify(ast, opt = _util.DEFAULT_OPT) { | ||
process.env.NODE_SQL_PARSER_OPT = JSON.stringify(opt); | ||
(0, _util.setParserOpt)(opt); | ||
return (0, _sql.default)(ast, opt); | ||
@@ -42,3 +42,3 @@ } | ||
} = opt; | ||
process.env.NODE_SQL_PARSER_OPT = JSON.stringify(opt); | ||
(0, _util.setParserOpt)(opt); | ||
const typeCase = database.toLowerCase(); | ||
@@ -45,0 +45,0 @@ if (parser[typeCase]) return parser[typeCase](sql); |
@@ -18,2 +18,3 @@ "use strict"; | ||
exports.hasVal = hasVal; | ||
exports.setParserOpt = setParserOpt; | ||
exports.toUpper = toUpper; | ||
@@ -42,2 +43,3 @@ exports.DEFAULT_OPT = void 0; | ||
exports.DEFAULT_OPT = DEFAULT_OPT; | ||
let parserOpt = DEFAULT_OPT; | ||
@@ -156,10 +158,7 @@ function commonOptionConnector(keyword, action, opt) { | ||
function getParserOpt() { | ||
let opt = DEFAULT_OPT; | ||
return parserOpt; | ||
} | ||
try { | ||
opt = JSON.parse(process.env.NODE_SQL_PARSER_OPT); | ||
} catch (parseError) {// ignore error | ||
} | ||
return opt; | ||
function setParserOpt(opt) { | ||
parserOpt = opt; | ||
} | ||
@@ -166,0 +165,0 @@ |
{ | ||
"name": "node-sql-parser", | ||
"version": "1.6.3", | ||
"version": "1.6.4", | ||
"description": "simple node sql parser", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
0
1444763