node-sql-parser
Advanced tools
Comparing version 1.6.9 to 1.6.10
@@ -92,4 +92,9 @@ // Type definitions for node-sql-parser 1.0 | ||
export type AST = Select | Insert_Replace | Update | Delete | Alter; | ||
export interface Use { | ||
type: 'use'; | ||
db: string; | ||
} | ||
export type AST = Use | Select | Insert_Replace | Update | Delete | Alter; | ||
export class Parser { | ||
@@ -96,0 +101,0 @@ constructor(); |
@@ -45,4 +45,11 @@ "use strict"; | ||
if (Array.isArray(limit)) clauses.push((0, _util.connector)('LIMIT', limit.map(_expr.exprToSQL))); | ||
if (limit) { | ||
const { | ||
seperator, | ||
value | ||
} = limit; | ||
clauses.push((0, _util.connector)('LIMIT', value.map(_expr.exprToSQL).join(`${seperator === 'offset' ? ' ' : ''}${seperator.toUpperCase()} `))); | ||
} | ||
return clauses.filter(_util.hasVal).join(' '); | ||
} |
@@ -214,2 +214,6 @@ "use strict"; | ||
case 'origin': | ||
str = value.toUpperCase(); | ||
break; | ||
case 'time': | ||
@@ -216,0 +220,0 @@ case 'date': |
{ | ||
"name": "node-sql-parser", | ||
"version": "1.6.9", | ||
"version": "1.6.10", | ||
"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 too big to display
Sorry, the diff of this file is too big to display
1455055
51603