You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECTsqlc.embed(transactions),
sqlc.embed(documents_meta)
FROM
transactions
JOIN documents_meta ONtransactions.document_id=documents_meta.idWHEREtransactions.posting_date>=@start_date
ANDtransactions.posting_date<=@end_date
ANDdocuments_meta.publishing_date=(
SELECTMAX(publishing_date)
FROM
documents_meta
)
ORDER BYtransactions.posting_dateDESC;
Expected Output
SELECTsqlc.embed(transactions),
sqlc.embed(documents_meta)
FROM
transactions
JOIN documents_meta ONtransactions.document_id=documents_meta.idWHEREtransactions.posting_date>=@start_date
ANDtransactions.posting_date<=@end_date
ANDdocuments_meta.publishing_date=(
SELECTMAX(publishing_date)
FROM
documents_meta
)
ORDER BYtransactions.posting_dateDESC;
Actual Output
SELECTsqlc.embed (transactions),
sqlc.embed (documents_meta)
FROM
transactions
JOIN documents_meta ONtransactions.document_id=documents_meta.idWHEREtransactions.posting_date>=@start_date
ANDtransactions.posting_date<=@end_date
ANDdocuments_meta.publishing_date=(
SELECTMAX(publishing_date)
FROM
documents_meta
)
ORDER BYtransactions.posting_dateDESC;
Usage
How are you calling / using the library?
I'm calling this using the prettier vs code pluqin
What SQL language(s) does this apply to?
This is for sqlite when paired with sqlc
Which SQL Formatter version are you using?
v11.0.0
Additional information
When I'm running the formatter it's inserting a space for sqlc.embed(transactions). This is an issue because it breaks sqlc's compilation. As best I can tell theres no configuration to prevent inserting this space.
The text was updated successfully, but these errors were encountered:
Thanks for reporting, but I should point out that you're using a pretty outdated version of SQL Formatter library (the latest version is 15.x). Perhaps also read the FAQ.
However this problem is also present in the latest version. There's an old issue open for this #444. So I'm closing this as duplicate.
I might suggest you instead give a try to prettier-plugin-sql-cst which does not have this issue and has in general pretty solid SQLite support.
Input data
Which SQL and options did you provide as input?
Expected Output
Actual Output
Usage
I'm calling this using the prettier vs code pluqin
This is for sqlite when paired with sqlc
v11.0.0
Additional information
When I'm running the formatter it's inserting a space for sqlc.embed(transactions). This is an issue because it breaks sqlc's compilation. As best I can tell theres no configuration to prevent inserting this space.
The text was updated successfully, but these errors were encountered: