First, thank you for all your work on this project! Truly incredible stuff.
I've been working with an MSSQL database (so using the TransactSQL database type) and came across some cases that astify couldn't handle (and probably should).
Describe the bug
A clear and concise description of what the bug is.
Database Engine
TransactSQL
To Reproduce
-the SQL that be parsed:
- "SELECT * FROM (SELECT * FROM [dummy_table]) AS [dummy_table_alias]"
- "SELECT STRING_AGG(DISTINCT column_name, ',') AS aggregated_values FROM table_name"
- "SELECT column_name FROM table_name FOR JSON PATH"
-the node-sql-parser version: 5.3.6
-the node version: >=14.20
Expected behavior
- The above queries should work after an astify -> sqlify -> astify operation
- If a query is the output of sqlify, then it should be astify-able
- Additional astify cases to work with valid TransactSQL queries
Thank you!
First, thank you for all your work on this project! Truly incredible stuff.
I've been working with an MSSQL database (so using the TransactSQL database type) and came across some cases that astify couldn't handle (and probably should).
Describe the bug
A clear and concise description of what the bug is.
This query: "SELECT * FROM (SELECT * FROM dummy_table) AS dummy_table_alias"
This query doesn't astify in TransactSQL: "SELECT STRING_AGG(DISTINCT column_name, ',') AS aggregated_values FROM table_name;"
JSON PATH is not handled: "SELECT column_name FROM table_name FOR JSON PATH"
The OFFSET, FETCH NEXT pattern
SELECT * FROM transactions ORDER BY created_at OFFSET 20 ROWS FETCH NEXT 10 ROWS ONLY
Database Engine
TransactSQL
To Reproduce
-the SQL that be parsed:
-the node-sql-parser version: 5.3.6
-the node version: >=14.20
Expected behavior
Thank you!