From 0707b877062c71a0d241a8ff9265b3d9b74b53be Mon Sep 17 00:00:00 2001 From: Taishi Naka Date: Tue, 3 Sep 2024 18:19:39 +0900 Subject: [PATCH] add a testcase: comment and on_conflict clause --- .../testfiles/dst/insert/insert_select.sql | 17 +++++++++++++++++ .../testfiles/src/insert/insert_select.sql | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/crates/uroborosql-fmt/testfiles/dst/insert/insert_select.sql b/crates/uroborosql-fmt/testfiles/dst/insert/insert_select.sql index 3711dac..14b7565 100644 --- a/crates/uroborosql-fmt/testfiles/dst/insert/insert_select.sql +++ b/crates/uroborosql-fmt/testfiles/dst/insert/insert_select.sql @@ -46,3 +46,20 @@ from where id = 1 -- trailing comment ; +insert +into + tbl +( + id +) +select + id as id +from + tbl2 +where + id = 1 -- trailing comment +on + conflict +do + nothing +; diff --git a/crates/uroborosql-fmt/testfiles/src/insert/insert_select.sql b/crates/uroborosql-fmt/testfiles/src/insert/insert_select.sql index 816e52b..2c6d3af 100644 --- a/crates/uroborosql-fmt/testfiles/src/insert/insert_select.sql +++ b/crates/uroborosql-fmt/testfiles/src/insert/insert_select.sql @@ -8,3 +8,7 @@ insert into tbl (id) select id from tbl2 where id = 1 -- trailing comment ; +insert into tbl (id) + select id from tbl2 where id = 1 -- trailing comment + on conflict do nothing + ;