Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle comments after select_statement at the end of insert_statement #93

Merged
merged 4 commits into from
Sep 3, 2024

Conversation

lemonadern
Copy link
Collaborator

@lemonadern lemonadern commented Sep 3, 2024

#88

概要

  • insert文の末尾に現れるコメントのうち一部のパターンに対応しました
    • 対応したパターン
      • insert 文内の select 文の後に現れるコメント
        • 例: insert into tbl (id) select id from tbl2 where id = 1 -- comment
    • 未対応のパターン
      • values句の後に現れるコメント
        • 例: insert into tbl (id) values (1) -- trailing comment
      • 括弧付きinsert文で、閉じ括弧の後に現れるコメント
        • 例: insert into tbl (id) (select id from tbl2 where id = 1) -- comment
      • on conflict句の後に現れるコメント
        • 例1: insert into tbl (did, dname) values (1, 'n') on conflict (did) do nothing -- comment
        • 例2: insert into tbl (did, name) values (1, 'n') on conflict (did) do update set dname = excluded.dname where did != 10 -- comment

@lemonadern lemonadern requested a review from tanzaku September 3, 2024 05:24
@lemonadern lemonadern marked this pull request as ready for review September 3, 2024 05:25
@lemonadern lemonadern requested a review from tanzaku September 3, 2024 09:32
@tanzaku tanzaku merged commit cb71681 into main Sep 3, 2024
8 checks passed
@tanzaku tanzaku deleted the handle-comments-at-the-end-of-insert-statement branch September 3, 2024 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants