File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -95,4 +95,9 @@ impl Dialect for MsSqlDialect {
9595 fn supports_timestamp_versioning ( & self ) -> bool {
9696 true
9797 }
98+
99+ /// See <https://learn.microsoft.com/en-us/sql/t-sql/language-elements/slash-star-comment-transact-sql?view=sql-server-ver16>
100+ fn supports_nested_comments ( & self ) -> bool {
101+ true
102+ }
98103}
Original file line number Diff line number Diff line change @@ -1620,6 +1620,22 @@ fn parse_create_table_with_valid_options() {
16201620 }
16211621}
16221622
1623+ #[ test]
1624+ fn parse_nested_slash_star_comment ( ) {
1625+ let sql = r#"
1626+ select
1627+ /*
1628+ comment level 1
1629+ /*
1630+ comment level 2
1631+ */
1632+ */
1633+ 1;
1634+ "# ;
1635+ let canonical = "SELECT 1" ;
1636+ ms ( ) . one_statement_parses_to ( sql, canonical) ;
1637+ }
1638+
16231639#[ test]
16241640fn parse_create_table_with_invalid_options ( ) {
16251641 let invalid_cases = vec ! [
You can’t perform that action at this time.
0 commit comments