mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-12-12 23:19:07 +00:00
17 lines
452 B
Rust
17 lines
452 B
Rust
use dialect::Dialect;
|
|
|
|
pub struct PostgreSqlDialect {}
|
|
|
|
impl Dialect for PostgreSqlDialect {
|
|
fn is_identifier_start(&self, ch: char) -> bool {
|
|
(ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == '@'
|
|
}
|
|
|
|
fn is_identifier_part(&self, ch: char) -> bool {
|
|
(ch >= 'a' && ch <= 'z')
|
|
|| (ch >= 'A' && ch <= 'Z')
|
|
|| (ch >= '0' && ch <= '9')
|
|
|| ch == '@'
|
|
|| ch == '_'
|
|
}
|
|
}
|