pgsql-ast-parser
Advanced tools
Comparing version 1.2.1 to 1.2.2
{ | ||
"name": "pgsql-ast-parser", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Yet another simple Postgres SQL parser/modifier", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -48,5 +48,9 @@ import { Statement, Expr, LOCATION } from './syntax/ast'; | ||
} else if (asts.length !== 1) { | ||
throw new Error('Ambiguous syntax: Please file an issue stating the request that has failed:\n' + sql); | ||
throw new Error(`💀 Ambiguous SQL syntax: Please file an issue stating the request that has failed at https://github.com/oguimbal/pgsql-ast-parser: | ||
${sql} | ||
`); | ||
} | ||
return asts[0]; | ||
} |
@@ -835,3 +835,17 @@ import 'mocha'; | ||
}); | ||
checkTreeExpr(['current_schema'], { | ||
type: 'keyword', | ||
keyword: 'current_schema', | ||
}); | ||
checkTreeExpr(['current_schema()'], { | ||
type: 'call', | ||
function: { | ||
type: 'keyword', | ||
keyword: 'current_schema', | ||
}, | ||
args: [], | ||
}); | ||
}) | ||
}); |
@@ -260,2 +260,16 @@ import 'mocha'; | ||
checkSelect(['select current_schema()'], { | ||
type: 'select', | ||
columns: [{ | ||
expr: { | ||
type: 'call', | ||
function: { | ||
type: 'keyword', | ||
keyword: 'current_schema', | ||
}, | ||
args: [], | ||
} | ||
}] | ||
}) | ||
}); |
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
705025
7765