mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-30 18:57:21 +00:00
[mssql] Support delimited identifiers in [square brackets]
T-SQL supports non-standard `[...]` quoting in addition to the widely supported and standard `"..."`: https://docs.microsoft.com/en-us/sql/relational-databases/databases/database-identifiers?view=sql-server-2017
This commit is contained in:
parent
e6f5ff2926
commit
d0a782d8cc
2 changed files with 12 additions and 1 deletions
|
@ -27,7 +27,14 @@ fn parse_mssql_identifiers() {
|
|||
};
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[test]
|
||||
fn parse_mssql_delimited_identifiers() {
|
||||
let _ = ms().one_statement_parses_to(
|
||||
"SELECT [a.b!] [FROM] FROM foo [WHERE]",
|
||||
"SELECT [a.b!] AS [FROM] FROM foo AS [WHERE]",
|
||||
);
|
||||
}
|
||||
|
||||
fn ms() -> TestedDialects {
|
||||
TestedDialects {
|
||||
dialects: vec![Box::new(MsSqlDialect {})],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue