sql-parser-cst
sql-parser-cst copied to clipboard
Parses SQL into Concrete Syntax Tree (CST)
The following fails to parse: ```sql SELECT 'foo' ^@ ANY = '{f,b}' ``` ``` Syntax Error: Unexpected "ANY" Was expecting to see: "$", "(", "+", "-", ":", "?", "@", "ARRAY",...
#### Domains - [x] [CREATE DOMAIN](https://www.postgresql.org/docs/current/sql-createdomain.html) - [x] `name [AS] data_type` - [x] `COLLATE collation` - [x] `DEFAULT expression` - [x] `domain_constraint [ ... ]`: - [x] `CONSTRAINT constraint_name` -...
I'm looking forward to this project to support Postgres dialect, so it can unblock [Postgres support in the prettier plugin](https://github.com/nene/prettier-plugin-sql-cst/issues/4). **Edit:** I'm hijacking this issue to track the overall progress...
Hey! First of all, I'd like to thank you for your work. You're truly doing an awesome job! Recently I've been dealing with Postgres aggregate expressions and https://github.com/nene/prettier-plugin-sql-cst is failing...
These fields don't actually exists, but are defined in types: - The `ResetAllParametersClause` contains `name` field. - The `CreateFunctionStmt` contains `behaviorKw` field. Also the parsing rule for `ResetAllParametersClause` seems to...
Thank you for this useful library! This issue is similar to https://github.com/nene/sql-parser-cst/issues/21 . When I parse the following SQL (a.sql) : ```sql SELECT EXTRACT(DAYOFWEEK FROM CURRENT_TIMESTAMP() AT TIME ZONE 'Asia/Tokyo')...
### Roles - [x] [CREATE ROLE](https://www.postgresql.org/docs/17/sql-createrole.html) - [x] `[WITH] option ...`: - [x] `SUPERUSER | NOSUPERUSER` - [x] `CREATEDB | NOCREATEDB` - [x] `CREATEROLE | NOCREATEROLE` - [x] `INHERIT |...
#### Basic syntax - [ ] [Keywords](https://www.postgresql.org/docs/current/sql-keywords-appendix.html) - [ ] Some reserved keywords can be used in implicit alias names - [x] All reserved keywords can be used in explicit...
- [x] [CREATE TRIGGER](https://www.postgresql.org/docs/16/sql-createtrigger.html) - [x] `OR REPLACE` - [x] `CONSTRAINT` - [x] `BEFORE | AFTER | INSTEAD OF` - [x] `event [ OR ... ]` - [x] event types:...
- [x] [CREATE SCHEMA](https://www.postgresql.org/docs/16/sql-createschema.html) - [x] `IF NOT EXISTS` - [x] optional `schema_name` - [x] `AUTHORIZATION role_specification`: - [x] `user_name` - [x] `CURRENT_ROLE | CURRENT_USER | SESSION_USER` - [x] schema...