taozhi8833998 / node-sql-parser

Parse simple SQL statements into an abstract syntax tree (AST) with the visited tableList and convert it back to SQL
https://taozhi8833998.github.io/node-sql-parser/
Apache License 2.0
750 stars 172 forks source link

Support DuckDB Dialect #1944

Open chanon opened 1 month ago

chanon commented 1 month ago

DuckDB is gaining a lot of popularity and version 1.0.0 was just released.

the project has attracted tens of thousands of stars and followers on GitHub and social media platforms. Download counts are in the millions each month

The SQL dialect I think is very similar to PostgreSQL and I have been able to use it in PostgreSQL mode initially, but the issue I'm running into which is intractable is parameterized queries use ? characters instead of $1, $2 ...

Not sure if there is another existing dialect that could work. (Tried MySQL, but more complex CTE / window function queries failed.)

Thank you so much for this awesome package!