nene / prettier-plugin-sql-cst

Prettier SQL plugin that uses sql-parser-cst
https://nene.github.io/prettier-sql-playground/
GNU General Public License v3.0
123 stars 7 forks source link

select top x fails #6

Closed cphillips83 closed 1 year ago

cphillips83 commented 1 year ago

Adding top 15 will break the parser.

EDIT: I realize this is targeted at sqlLite but I've put some pretty large and complex queries in to this thing and top X is the only thing it gets tripped up on when testing against MSSQL

nene commented 1 year ago

Yes, the TOP x syntax is specific to Microsoft flavor of SQL. This plugin only supports SQLite and BigQuery.

Support for Transact-SQL is unlikely to happen any time soon... well, really any time in the foreseeable future as it would take several months of full-time work, and I'd rather like to have a support for Postgres, which is equally huge.