node-sql-parser
Advanced tools
Comparing version 3.9.0 to 3.9.1
@@ -769,4 +769,12 @@ | ||
export type column_ref = string_constants_escape | { | ||
type: 'column_ref'; | ||
table: string; | ||
column: column | '*'; | ||
arrow?: '->>' | '->'; | ||
property?: literal_string | literal_numeric; | ||
} | { | ||
type: 'column_ref'; | ||
table: ident; | ||
@@ -773,0 +781,0 @@ column: column | '*'; |
@@ -52,2 +52,3 @@ (function (global, factory) { | ||
table, | ||
type, | ||
prefix = 'into', | ||
@@ -66,3 +67,3 @@ columns, | ||
} = onDuplicateUpdate || {}; | ||
const clauses = ['INSERT', (0, _util.toUpper)(prefix), (0, _tables.tablesToSQL)(table), partitionToSQL(partition)]; | ||
const clauses = [(0, _util.toUpper)(type), (0, _util.toUpper)(prefix), (0, _tables.tablesToSQL)(table), partitionToSQL(partition)]; | ||
if (Array.isArray(columns)) clauses.push(`(${columns.map(_util.identifierToSql).join(', ')})`); | ||
@@ -69,0 +70,0 @@ clauses.push((0, _util.commonOptionConnector)(Array.isArray(values) ? 'VALUES' : '', valuesToSQL, values)); |
@@ -20,3 +20,3 @@ (function (global, factory) { | ||
_exports.default = toSQL; | ||
const surportedTypes = ['analyze', 'attach', 'select', 'delete', 'update', 'insert', 'drop', 'rename', 'truncate', 'call', 'desc', 'use', 'alter', 'set', 'create', 'lock', 'unlock', 'bigquery', 'declare', 'show']; | ||
const surportedTypes = ['analyze', 'attach', 'select', 'delete', 'update', 'insert', 'drop', 'rename', 'truncate', 'call', 'desc', 'use', 'alter', 'set', 'create', 'lock', 'unlock', 'bigquery', 'declare', 'show', 'replace']; | ||
@@ -23,0 +23,0 @@ function checkSupported(expr) { |
@@ -33,2 +33,3 @@ (function (global, factory) { | ||
truncate: _command.commonCmdToSQL, | ||
replace: _insert.insertToSQL, | ||
declare: _command.declareToSQL, | ||
@@ -35,0 +36,0 @@ use: _command.useToSQL, |
{ | ||
"name": "node-sql-parser", | ||
"version": "3.9.0", | ||
"version": "3.9.1", | ||
"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
38846380
95
22675