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 1.4.1-beta to 1.4.1

18

lib/sql.js

@@ -375,4 +375,4 @@ 'use strict'

function dropAndTruncateToSQL(stmt) {
const clauses = [`${stmt.type && stmt.type.toUpperCase()} TABLE`]
function dropToSQL(stmt) {
const clauses = ['DROP TABLE']
let str = ''

@@ -385,2 +385,12 @@ if (has(stmt, 'table')) str = tablesToSQL(stmt.table)

function truncateToSQL(stmt) {
const clauses = ['TRUNCATE']
if (stmt.keyword) clauses.push(stmt.keyword)
let str = ''
if (has(stmt, 'table')) str = tablesToSQL(stmt.table)
if (has(stmt, 'db') && stmt.db !== null) str = `${identifierToSql(stmt.db)}.${str}`
clauses.push(str)
return `${clauses.join(' ')}`
}
function renameToSQL(stmt) {

@@ -474,4 +484,4 @@ const type = `${stmt.type && stmt.type.toUpperCase()} TABLE `

insert : insertToSQL,
drop : dropAndTruncateToSQL,
truncate : dropAndTruncateToSQL,
drop : dropToSQL,
truncate : truncateToSQL,
use : useToSQL,

@@ -478,0 +488,0 @@ rename : renameToSQL,

{
"name": "node-sql-parser",
"version": "1.4.1-beta",
"version": "1.4.1",
"description": "simple node sql parser",

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

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