akheron/sqltyper

`The internal SQL parser failed to parse the SQL statement` for a query with `ANY`

lenguyenthanh opened this issue · 9 comments

Below are my simpler version of my query and the error message.
If you need I'll try to create a sample data and query.

Query

select * 
from table1
where not table1.id = any(
	select table1.id
	from table2
	where table2.id <> '1'
)```

## Error Message

WARNING: The internal SQL parser failed to parse the SQL statement.

Parse error: Expect symbol ) at (4:2)

1| select * 
2| from table1
3| where not table1.id = any(
4|  select table1.id
    ^



P/S:  Thanks for your great library. I'll try not only report issues but also contribute to this project if I can.

It also doesn't work with keyword using.

Yeah, support for any/some/all does not yet exist in the parser.

In your case, you could use in as a workaround, because it’s equal to = any.

Could you open a separate issue for using?

Yes, I'll create new issue for using. Do we have a list of supported syntax? I'll be really great if we have that.

Unfortunately no. The goal is to eventually support all PostgreSQL syntax.

Understand, I'll try to work on one of the syntax this weekend.

Nice! Let me know if you need help.

This issue still seems to be present in the current version

The query in the issue description parses correctly with the newest version. Do you have an example of another query that doesn’t? If so, please open a new issue.