mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-12-04 03:31:39 +00:00
Change the default serialization of "not equals" operator to <>
`!=` is not standard, though widely supported - https://stackoverflow.com/a/723426/1026
This commit is contained in:
parent
f93e69d1d4
commit
eeae3af6a3
3 changed files with 5 additions and 5 deletions
|
|
@ -32,7 +32,7 @@ impl ToString for SQLOperator {
|
|||
SQLOperator::GtEq => ">=".to_string(),
|
||||
SQLOperator::LtEq => "<=".to_string(),
|
||||
SQLOperator::Eq => "=".to_string(),
|
||||
SQLOperator::NotEq => "!=".to_string(),
|
||||
SQLOperator::NotEq => "<>".to_string(),
|
||||
SQLOperator::And => "AND".to_string(),
|
||||
SQLOperator::Or => "OR".to_string(),
|
||||
SQLOperator::Not => "NOT".to_string(),
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ pub enum Token {
|
|||
Whitespace(Whitespace),
|
||||
/// Equality operator `=`
|
||||
Eq,
|
||||
/// Not Equals operator `!=` or `<>`
|
||||
/// Not Equals operator `<>` (or `!=` in some dialects)
|
||||
Neq,
|
||||
/// Less Than operator `<`
|
||||
Lt,
|
||||
|
|
@ -100,7 +100,7 @@ impl ToString for Token {
|
|||
Token::Comma => ",".to_string(),
|
||||
Token::Whitespace(ws) => ws.to_string(),
|
||||
Token::Eq => "=".to_string(),
|
||||
Token::Neq => "-".to_string(),
|
||||
Token::Neq => "<>".to_string(),
|
||||
Token::Lt => "<".to_string(),
|
||||
Token::Gt => ">".to_string(),
|
||||
Token::LtEq => "<=".to_string(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue