Huge News!Announcing our $40M Series B led by Abstract Ventures.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 1.3.4 to 1.4.0

10

lib/sql.js

@@ -298,8 +298,8 @@ 'use strict'

const clauses = ['DELETE']
const { columns, from, tables, where } = stmt
const { columns, from, table, where } = stmt
if (columns === '*') clauses.push('*')
else columnsToSQL(columns, from) && clauses.push(columnsToSQL(columns, from))
if (Array.isArray(tables)) {
if (!(tables.length === 1 && tables[0].addition === true)) clauses.push(tablesToSQL(tables))
if (Array.isArray(table)) {
if (!(table.length === 1 && table[0].addition === true)) clauses.push(tablesToSQL(table))
}

@@ -314,3 +314,5 @@ if (Array.isArray(from)) clauses.push('FROM', tablesToSQL(from))

const clauses = ['UPDATE']
if (has(stmt, 'table') && stmt.table !== null) clauses.push(identifierToSql(stmt.table, false))
// cross-table update
if (has(stmt, 'table') && stmt.table !== null) clauses.push(tablesToSQL(stmt.table))
if (Array.isArray(stmt.set)) clauses.push('SET', setToSQL(stmt.set))

@@ -317,0 +319,0 @@

4

package.json
{
"name": "node-sql-parser",
"version": "1.3.4",
"version": "1.4.0",
"description": "simple node sql parser",

@@ -47,3 +47,3 @@ "main": "index.js",

"eslint": "^5.12.1",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-config-strict": "^14.0.1",

@@ -50,0 +50,0 @@ "eslint-plugin-filenames": "^1.3.2",

@@ -161,1 +161,31 @@ # Nodejs SQL Parser

[GPLv2](LICENSE)
## Buy me a Coffee
If you like my project, **Star** in the corresponding project right corner. Your support is my biggest encouragement! ^_^
You can also scan the qr code below or open paypal link to donation to Author.
### Paypal
Donate money by [paypal](https://www.paypal.me/taozhi8833998/5) to my account [taozhi8833998@163.com](taozhi8833998@163.com)
### AliPay(支付宝)
<p align="center">
<img src="https://github.com/taozhi8833998/node-sql-parser/blob/master/img/alipay.jpg" width="300" hight="300">
</p>
### Wechat(微信)
<p align="center">
<img src="https://github.com/taozhi8833998/node-sql-parser/blob/master/img/wechat_pay.jpg" width="300" hight="300">
</p>
### Explain
If you have made a donation, you can leave your name and email in the issue, your name will be written to the donation list.
## [Donation list](https://github.com/taozhi8833998/node-sql-parser/blob/master/DONATIONLIST.md)

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

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