pgsql-ast-parser
pgsql-ast-parser copied to clipboard
Yet another simple Postgres SQL parser
Hi! The library that my project utilises (`pg-mem`) depends on `psql-ast-parser` library. Recently I wanted to add support for `@?` operator for my `pg-mem` postgres instance. This errored and pointed...
I use the demo statement `insert into my_table values (1, 'two')` and run with ```ts parse(`insert into my_table values (1, 'two')`, { locationTracking: true }) ``` Then I find `insert`...
Would like to see support for `GROUPING SETS`, `CUBE`, and `ROLLUP` in `GROUP BY`!
This existing test passes just fine: ```ts checkTreeExpr(['42+51', '42 + 51'], { type: 'binary', op: '+', left: { type: 'integer', value: 42, }, right: { type: 'integer', value: 51, }...
If I parse: ```sql SELECT * FROM cars WHERE (model = 'ford' OR model = 'benz' OR model ='honda') AND color = 'white'; ``` And I examine the AST of...
```CREATE TABLE "tbl_point_of_expedition" ("id" SERIAL NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), "idSifen" character varying NOT NULL, "establishmentId" integer NOT NULL, "adminjsTitle" character...
AFAICT, these unary operators/expressions still lack support: **[9.3. Mathematical Functions and Operators](https://www.postgresql.org/docs/16/functions-math.html)** - [x] `|/ double precision → double precision` - [x] `||/ double precision → double precision` - [x]...
I have been reviewing this library's support for unary operators, and I noticed that `IS UNKNOWN` and `IS NOT UNKNOWN` were not supported, so I have added support for them,...
Are there plans to support `CREATE DOMAIN`?
First of all, thanks for this awesome project! I spotted a bug with the location tracking where table aliases are not tracked if the `AS` keyword is omitted, for example:...