node-sql-parser
Advanced tools
Comparing version 1.3.4 to 1.4.0
@@ -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 @@ |
{ | ||
"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
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
379496
12987
190