mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-12 18:28:01 +00:00
Non-Latin characters support (#840)
* Non latin characters --------- Co-authored-by: Maciej Skrzypkowski <maciej.skrzypkowski@satoricyber.com> * Test for mysql --------- Co-authored-by: Maciej Skrzypkowski <maciej.skrzypkowski@satoricyber.com>
This commit is contained in:
parent
eb67d489bb
commit
a1b7341b87
6 changed files with 34 additions and 30 deletions
|
@ -22,13 +22,11 @@ impl Dialect for MsSqlDialect {
|
|||
|
||||
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.
|
||||
ch.is_ascii_lowercase() || ch.is_ascii_uppercase() || ch == '_' || ch == '#' || ch == '@'
|
||||
ch.is_alphabetic() || ch == '_' || ch == '#' || ch == '@'
|
||||
}
|
||||
|
||||
fn is_identifier_part(&self, ch: char) -> bool {
|
||||
ch.is_ascii_lowercase()
|
||||
|| ch.is_ascii_uppercase()
|
||||
ch.is_alphabetic()
|
||||
|| ch.is_ascii_digit()
|
||||
|| ch == '@'
|
||||
|| ch == '$'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue