pgsql-ast-parser icon indicating copy to clipboard operation
pgsql-ast-parser copied to clipboard

No parentheses indicator?

Open rgwozdz opened this issue 2 years ago • 0 comments

If I parse:

SELECT * FROM cars
WHERE
(model = 'ford' OR model = 'benz' OR model ='honda') AND color = 'white';

And I examine the AST of the WHERE, there doesn't seem to be any explicit indication of the parentheses being present on the left node of the tree. Can you confirm? The node-sql-parser adds a boolean flag to each node if it is enclosed by parentheses. Are you open to adopting this pattern in this parser? If so I can attempt a PR?

rgwozdz avatar Apr 15 '23 01:04 rgwozdz