mk3008 / Carbunql

Carbunql provides query parsing and building functionality.
https://mk3008.github.io/Carbunql/
MIT License
40 stars 3 forks source link

Changes to SQL comments #455

Closed mk3008 closed 2 weeks ago

mk3008 commented 2 weeks ago

Currently, SQL comments are displayed before the WITH clause if there is one, but in the future, they will be displayed immediately before the SELECT clause.

In addition, a new function called a header comment clause will be added. This will always be output first.

Reason

The WITH clause contains a mixture of other functions that belong to itself and those that belong to subqueries, etc., so it is not appropriate to display them before the WITH clause.

However, having a comment at the beginning of the SQL makes it easier to investigate from the log.

Therefore, the comments will be divided into two types.