Skip to content

Commit 25bb871

Browse files
romanbRoman Borschel
and
Roman Borschel
authored
Enable double-dot-notation for mssql. (apache#1787)
Co-authored-by: Roman Borschel <[email protected]>
1 parent 91327bb commit 25bb871

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/dialect/mssql.rs

+5
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,9 @@ impl Dialect for MsSqlDialect {
101101
fn supports_nested_comments(&self) -> bool {
102102
true
103103
}
104+
105+
/// See <https://learn.microsoft.com/en-us/sql/t-sql/queries/from-transact-sql>
106+
fn supports_object_name_double_dot_notation(&self) -> bool {
107+
true
108+
}
104109
}

tests/sqlparser_mssql.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1910,6 +1910,11 @@ fn parse_mssql_varbinary_max_length() {
19101910
}
19111911
}
19121912

1913+
#[test]
1914+
fn parse_mssql_table_identifier_with_default_schema() {
1915+
ms().verified_stmt("SELECT * FROM mydatabase..MyTable");
1916+
}
1917+
19131918
fn ms() -> TestedDialects {
19141919
TestedDialects::new(vec![Box::new(MsSqlDialect {})])
19151920
}

0 commit comments

Comments
 (0)