mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-18 21:20:15 +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
|
@ -4,6 +4,10 @@ use crate::dialect::Dialect;
|
|||
pub struct MsSqlDialect {}
|
||||
|
||||
impl Dialect for MsSqlDialect {
|
||||
fn is_delimited_identifier_start(&self, ch: char) -> bool {
|
||||
ch == '"' || ch == '['
|
||||
}
|
||||
|
||||
fn is_identifier_start(&self, ch: char) -> bool {
|
||||
// See https://docs.microsoft.com/en-us/sql/relational-databases/databases/database-identifiers?view=sql-server-2017#rules-for-regular-identifiers
|
||||
// We don't support non-latin "letters" currently.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue