pgsql-ast-parser
Advanced tools
Comparing version 4.1.12 to 4.1.13
{ | ||
"name": "pgsql-ast-parser", | ||
"version": "4.1.12", | ||
"version": "4.1.13", | ||
"description": "Yet another simple Postgres SQL parser/modifier", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -235,2 +235,6 @@ | ||
# FAQ | ||
- How to parse named parameters like `:name` ? 👉 See [here](https://github.com/oguimbal/pgsql-ast-parser/issues/8#issuecomment-774280514) ([TLDR](https://runkit.com/oguimbal/pgsql-ast-parser.circumvent-named-arguments)) | ||
# Development | ||
@@ -237,0 +241,0 @@ |
@@ -333,2 +333,31 @@ import 'mocha'; | ||
checkSelect(['select count(distinct("userId")) from photo'], { | ||
type: 'select', | ||
from: [{ type: 'table', name: 'photo' }], | ||
columns: columns({ | ||
type: 'call', | ||
function: 'count', | ||
args: [{ | ||
type: 'call', | ||
function: 'distinct', | ||
args: [{ type: 'ref', name: 'userId' }], | ||
}], | ||
}) | ||
}); | ||
checkSelect(['select max(distinct("userId")) from photo'], { | ||
type: 'select', | ||
from: [{ type: 'table', name: 'photo' }], | ||
columns: columns({ | ||
type: 'call', | ||
function: 'max', | ||
args: [{ | ||
type: 'call', | ||
function: 'distinct', | ||
args: [{ type: 'ref', name: 'userId' }], | ||
}], | ||
}) | ||
}); | ||
checkSelect(['select all a from test'], { | ||
@@ -335,0 +364,0 @@ type: 'select', |
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
1178982
12838
253