New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-sql-parser

Package Overview
Dependencies
Maintainers
1
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-sql-parser - npm Package Compare versions

Comparing version 3.9.2 to 3.9.3

4

ast/postgresql.ts

@@ -537,3 +537,3 @@

export type table_base = { type: 'dual' } | table_name & { as?: alias_clause; } | { expr: union_stmt; as?: alias_clause; };
export type table_base = { type: 'dual' } | { expr: union_stmt; as?: alias_clause; } | { type: 'expr'; expr: expr; as?: alias_clause; } | table_name & { as?: alias_clause; };

@@ -550,3 +550,3 @@

export type table_name = { db?: ident; table: ident | '*'; };
export type table_name = { db?: ident; schema?: ident, table: ident | '*'; };

@@ -553,0 +553,0 @@

@@ -25,2 +25,3 @@ (function (global, factory) {

const {
collate,
target,

@@ -51,2 +52,3 @@ expr: expression,

if (alias) suffix += ` AS ${(0, _util.identifierToSql)(alias)}`;
if (collate) suffix += ` ${(0, _util.commonTypeValue)(collate).join(' ')}`;
return `${prefix}${symbolChar}${dataType}${str}${suffix}`;

@@ -76,9 +78,11 @@ }

parentheses,
over
over,
collate
} = expr;
const collateStr = (0, _util.commonTypeValue)(collate).join(' ');
const overStr = (0, _over.overToSQL)(over);
if (!args) return [name, overStr].filter(_util.hasVal).join(' ');
const str = `${name}(${(0, _expr.exprToSQL)(args).join(', ')})`;
return [parentheses ? `(${str})` : str, overStr].filter(_util.hasVal).join(' ');
return [parentheses ? `(${str})` : str, collateStr, overStr].filter(_util.hasVal).join(' ');
}
});

@@ -29,9 +29,11 @@ (function (global, factory) {

as,
expr
expr,
schema
} = tableInfo;
const database = (0, _util.identifierToSql)(db);
const schemaStr = (0, _util.identifierToSql)(schema);
let tableName = table && (0, _util.identifierToSql)(table);
if (expr && expr.type === 'values') tableName = `(${(0, _util.commonOptionConnector)('VALUES', _insert.valuesToSQL, expr.values)})`;
if (expr && expr.type !== 'values') tableName = (0, _expr.exprToSQL)(expr);
const str = database ? `${database}.${tableName}` : tableName;
const str = [database, schemaStr, tableName].filter(_util.hasVal).join('.');
if (as) return `${str} AS ${(0, _util.identifierToSql)(as)}`;

@@ -38,0 +40,0 @@ return str;

{
"name": "node-sql-parser",
"version": "3.9.2",
"version": "3.9.3",
"description": "simple node sql parser",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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 too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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