mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-02 21:22:15 +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
|
@ -23,16 +23,12 @@ impl Dialect for PostgreSqlDialect {
|
|||
fn is_identifier_start(&self, ch: char) -> bool {
|
||||
// See https://www.postgresql.org/docs/11/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
|
||||
// We don't yet support identifiers beginning with "letters with
|
||||
// diacritical marks and non-Latin letters"
|
||||
ch.is_ascii_lowercase() || ch.is_ascii_uppercase() || ch == '_'
|
||||
// diacritical marks"
|
||||
ch.is_alphabetic() || ch == '_'
|
||||
}
|
||||
|
||||
fn is_identifier_part(&self, ch: char) -> bool {
|
||||
ch.is_ascii_lowercase()
|
||||
|| ch.is_ascii_uppercase()
|
||||
|| ch.is_ascii_digit()
|
||||
|| ch == '$'
|
||||
|| ch == '_'
|
||||
ch.is_alphabetic() || ch.is_ascii_digit() || ch == '$' || ch == '_'
|
||||
}
|
||||
|
||||
fn parse_statement(&self, parser: &mut Parser) -> Option<Result<Statement, ParserError>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue