pgsql-ast-parser
Advanced tools
Comparing version 4.1.9 to 4.1.10
{ | ||
"name": "pgsql-ast-parser", | ||
"version": "4.1.9", | ||
"version": "4.1.10", | ||
"description": "Yet another simple Postgres SQL parser/modifier", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -903,2 +903,3 @@ import * as a from './syntax/ast'; | ||
case 'list': | ||
case 'array': | ||
return this.array(val); | ||
@@ -905,0 +906,0 @@ case 'call': |
@@ -653,3 +653,3 @@ // import { IType } from '../../interfaces'; | ||
export interface ExprList { | ||
type: 'list'; | ||
type: 'list' | 'array'; | ||
expressions: Expr[]; | ||
@@ -656,0 +656,0 @@ } |
@@ -221,2 +221,10 @@ import 'mocha'; | ||
checkTreeExpr(`ARRAY[1, '2']`, { | ||
type: 'array', | ||
expressions: [ | ||
{ type: 'integer', value: 1 }, | ||
{ type: 'string', value: '2' }, | ||
] | ||
}); | ||
checkTreeExpr(`a->>42`, { | ||
@@ -223,0 +231,0 @@ type: 'member', |
@@ -295,3 +295,5 @@ import { IAstPartialMapper, AstDefaultMapper } from './ast-mapper'; | ||
array: v => { | ||
list(v.expressions, e => m.expr(e), true); | ||
ret.push(v.type === 'array' ? 'ARRAY[' : '('); | ||
list(v.expressions, e => m.expr(e), false); | ||
ret.push(v.type === 'array' ? ']' : ')'); | ||
}, | ||
@@ -298,0 +300,0 @@ |
@@ -452,3 +452,3 @@ import { nil } from '../utils'; | ||
export interface ExprList { | ||
type: 'list'; | ||
type: 'list' | 'array'; | ||
expressions: Expr[]; | ||
@@ -455,0 +455,0 @@ } |
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 not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1157914
12607