1use core::fmt;
19
20#[cfg(not(feature = "std"))]
21use alloc::{string::String, vec::Vec};
22
23#[cfg(feature = "serde")]
24use serde::{Deserialize, Serialize};
25
26#[cfg(feature = "visitor")]
27use sqlparser_derive::{Visit, VisitMut};
28
29use super::display_separated;
30
31#[derive(#[automatically_derived]
impl ::core::fmt::Debug for UnaryOperator {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
UnaryOperator::AtDashAt => "AtDashAt",
UnaryOperator::BangNot => "BangNot",
UnaryOperator::BitwiseNot => "BitwiseNot",
UnaryOperator::DoubleAt => "DoubleAt",
UnaryOperator::Hash => "Hash",
UnaryOperator::Plus => "Plus",
UnaryOperator::Minus => "Minus",
UnaryOperator::Not => "Not",
UnaryOperator::PGAbs => "PGAbs",
UnaryOperator::PGCubeRoot => "PGCubeRoot",
UnaryOperator::PGPostfixFactorial => "PGPostfixFactorial",
UnaryOperator::PGPrefixFactorial => "PGPrefixFactorial",
UnaryOperator::PGSquareRoot => "PGSquareRoot",
UnaryOperator::QuestionDash => "QuestionDash",
UnaryOperator::QuestionPipe => "QuestionPipe",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for UnaryOperator { }Copy, #[automatically_derived]
impl ::core::clone::Clone for UnaryOperator {
#[inline]
fn clone(&self) -> UnaryOperator { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for UnaryOperator {
#[inline]
fn eq(&self, other: &UnaryOperator) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for UnaryOperator {
#[inline]
fn partial_cmp(&self, other: &UnaryOperator)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for UnaryOperator {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for UnaryOperator {
#[inline]
fn cmp(&self, other: &UnaryOperator) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for UnaryOperator {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
33#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for UnaryOperator {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
::recursive::get_stack_allocation_size(),
move || -> ::std::ops::ControlFlow<V::Break>
{
{
match self {
Self::AtDashAt => {}
Self::BangNot => {}
Self::BitwiseNot => {}
Self::DoubleAt => {}
Self::Hash => {}
Self::Plus => {}
Self::Minus => {}
Self::Not => {}
Self::PGAbs => {}
Self::PGCubeRoot => {}
Self::PGPostfixFactorial => {}
Self::PGPrefixFactorial => {}
Self::PGSquareRoot => {}
Self::QuestionDash => {}
Self::QuestionPipe => {}
}
::std::ops::ControlFlow::Continue(())
}
})
}
}Visit, impl sqlparser::ast::VisitMut for UnaryOperator {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
::recursive::get_stack_allocation_size(),
move || -> ::std::ops::ControlFlow<V::Break>
{
{
match self {
Self::AtDashAt => {}
Self::BangNot => {}
Self::BitwiseNot => {}
Self::DoubleAt => {}
Self::Hash => {}
Self::Plus => {}
Self::Minus => {}
Self::Not => {}
Self::PGAbs => {}
Self::PGCubeRoot => {}
Self::PGPostfixFactorial => {}
Self::PGPrefixFactorial => {}
Self::PGSquareRoot => {}
Self::QuestionDash => {}
Self::QuestionPipe => {}
}
::std::ops::ControlFlow::Continue(())
}
})
}
}VisitMut))]
35pub enum UnaryOperator {
36 AtDashAt,
39 BangNot,
41 BitwiseNot,
43 DoubleAt,
46 Hash,
49 Plus,
51 Minus,
53 Not,
55 PGAbs,
57 PGCubeRoot,
59 PGPostfixFactorial,
61 PGPrefixFactorial,
63 PGSquareRoot,
65 QuestionDash,
68 QuestionPipe,
71}
72
73impl fmt::Display for UnaryOperator {
74 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
75 f.write_str(match self {
76 UnaryOperator::AtDashAt => "@-@",
77 UnaryOperator::BangNot => "!",
78 UnaryOperator::BitwiseNot => "~",
79 UnaryOperator::DoubleAt => "@@",
80 UnaryOperator::Hash => "#",
81 UnaryOperator::Minus => "-",
82 UnaryOperator::Not => "NOT",
83 UnaryOperator::PGAbs => "@",
84 UnaryOperator::PGCubeRoot => "||/",
85 UnaryOperator::PGPostfixFactorial => "!",
86 UnaryOperator::PGPrefixFactorial => "!!",
87 UnaryOperator::PGSquareRoot => "|/",
88 UnaryOperator::Plus => "+",
89 UnaryOperator::QuestionDash => "?-",
90 UnaryOperator::QuestionPipe => "?|",
91 })
92 }
93}
94
95#[derive(#[automatically_derived]
impl ::core::fmt::Debug for BinaryOperator {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
BinaryOperator::Plus =>
::core::fmt::Formatter::write_str(f, "Plus"),
BinaryOperator::Minus =>
::core::fmt::Formatter::write_str(f, "Minus"),
BinaryOperator::Multiply =>
::core::fmt::Formatter::write_str(f, "Multiply"),
BinaryOperator::Divide =>
::core::fmt::Formatter::write_str(f, "Divide"),
BinaryOperator::Modulo =>
::core::fmt::Formatter::write_str(f, "Modulo"),
BinaryOperator::StringConcat =>
::core::fmt::Formatter::write_str(f, "StringConcat"),
BinaryOperator::Gt => ::core::fmt::Formatter::write_str(f, "Gt"),
BinaryOperator::Lt => ::core::fmt::Formatter::write_str(f, "Lt"),
BinaryOperator::GtEq =>
::core::fmt::Formatter::write_str(f, "GtEq"),
BinaryOperator::LtEq =>
::core::fmt::Formatter::write_str(f, "LtEq"),
BinaryOperator::Spaceship =>
::core::fmt::Formatter::write_str(f, "Spaceship"),
BinaryOperator::Eq => ::core::fmt::Formatter::write_str(f, "Eq"),
BinaryOperator::NotEq =>
::core::fmt::Formatter::write_str(f, "NotEq"),
BinaryOperator::And =>
::core::fmt::Formatter::write_str(f, "And"),
BinaryOperator::Or => ::core::fmt::Formatter::write_str(f, "Or"),
BinaryOperator::Xor =>
::core::fmt::Formatter::write_str(f, "Xor"),
BinaryOperator::BitwiseOr =>
::core::fmt::Formatter::write_str(f, "BitwiseOr"),
BinaryOperator::BitwiseAnd =>
::core::fmt::Formatter::write_str(f, "BitwiseAnd"),
BinaryOperator::BitwiseXor =>
::core::fmt::Formatter::write_str(f, "BitwiseXor"),
BinaryOperator::DuckIntegerDivide =>
::core::fmt::Formatter::write_str(f, "DuckIntegerDivide"),
BinaryOperator::MyIntegerDivide =>
::core::fmt::Formatter::write_str(f, "MyIntegerDivide"),
BinaryOperator::Match =>
::core::fmt::Formatter::write_str(f, "Match"),
BinaryOperator::Regexp =>
::core::fmt::Formatter::write_str(f, "Regexp"),
BinaryOperator::Custom(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Custom",
&__self_0),
BinaryOperator::PGBitwiseXor =>
::core::fmt::Formatter::write_str(f, "PGBitwiseXor"),
BinaryOperator::PGBitwiseShiftLeft =>
::core::fmt::Formatter::write_str(f, "PGBitwiseShiftLeft"),
BinaryOperator::PGBitwiseShiftRight =>
::core::fmt::Formatter::write_str(f, "PGBitwiseShiftRight"),
BinaryOperator::PGExp =>
::core::fmt::Formatter::write_str(f, "PGExp"),
BinaryOperator::PGOverlap =>
::core::fmt::Formatter::write_str(f, "PGOverlap"),
BinaryOperator::PGRegexMatch =>
::core::fmt::Formatter::write_str(f, "PGRegexMatch"),
BinaryOperator::PGRegexIMatch =>
::core::fmt::Formatter::write_str(f, "PGRegexIMatch"),
BinaryOperator::PGRegexNotMatch =>
::core::fmt::Formatter::write_str(f, "PGRegexNotMatch"),
BinaryOperator::PGRegexNotIMatch =>
::core::fmt::Formatter::write_str(f, "PGRegexNotIMatch"),
BinaryOperator::PGLikeMatch =>
::core::fmt::Formatter::write_str(f, "PGLikeMatch"),
BinaryOperator::PGILikeMatch =>
::core::fmt::Formatter::write_str(f, "PGILikeMatch"),
BinaryOperator::PGNotLikeMatch =>
::core::fmt::Formatter::write_str(f, "PGNotLikeMatch"),
BinaryOperator::PGNotILikeMatch =>
::core::fmt::Formatter::write_str(f, "PGNotILikeMatch"),
BinaryOperator::PGStartsWith =>
::core::fmt::Formatter::write_str(f, "PGStartsWith"),
BinaryOperator::Arrow =>
::core::fmt::Formatter::write_str(f, "Arrow"),
BinaryOperator::LongArrow =>
::core::fmt::Formatter::write_str(f, "LongArrow"),
BinaryOperator::HashArrow =>
::core::fmt::Formatter::write_str(f, "HashArrow"),
BinaryOperator::HashLongArrow =>
::core::fmt::Formatter::write_str(f, "HashLongArrow"),
BinaryOperator::AtAt =>
::core::fmt::Formatter::write_str(f, "AtAt"),
BinaryOperator::AtArrow =>
::core::fmt::Formatter::write_str(f, "AtArrow"),
BinaryOperator::ArrowAt =>
::core::fmt::Formatter::write_str(f, "ArrowAt"),
BinaryOperator::HashMinus =>
::core::fmt::Formatter::write_str(f, "HashMinus"),
BinaryOperator::AtQuestion =>
::core::fmt::Formatter::write_str(f, "AtQuestion"),
BinaryOperator::Question =>
::core::fmt::Formatter::write_str(f, "Question"),
BinaryOperator::QuestionAnd =>
::core::fmt::Formatter::write_str(f, "QuestionAnd"),
BinaryOperator::QuestionPipe =>
::core::fmt::Formatter::write_str(f, "QuestionPipe"),
BinaryOperator::PGCustomBinaryOperator(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"PGCustomBinaryOperator", &__self_0),
BinaryOperator::Overlaps =>
::core::fmt::Formatter::write_str(f, "Overlaps"),
BinaryOperator::DoubleHash =>
::core::fmt::Formatter::write_str(f, "DoubleHash"),
BinaryOperator::LtDashGt =>
::core::fmt::Formatter::write_str(f, "LtDashGt"),
BinaryOperator::AndLt =>
::core::fmt::Formatter::write_str(f, "AndLt"),
BinaryOperator::AndGt =>
::core::fmt::Formatter::write_str(f, "AndGt"),
BinaryOperator::LtLtPipe =>
::core::fmt::Formatter::write_str(f, "LtLtPipe"),
BinaryOperator::PipeGtGt =>
::core::fmt::Formatter::write_str(f, "PipeGtGt"),
BinaryOperator::AndLtPipe =>
::core::fmt::Formatter::write_str(f, "AndLtPipe"),
BinaryOperator::PipeAndGt =>
::core::fmt::Formatter::write_str(f, "PipeAndGt"),
BinaryOperator::LtCaret =>
::core::fmt::Formatter::write_str(f, "LtCaret"),
BinaryOperator::GtCaret =>
::core::fmt::Formatter::write_str(f, "GtCaret"),
BinaryOperator::QuestionHash =>
::core::fmt::Formatter::write_str(f, "QuestionHash"),
BinaryOperator::QuestionDash =>
::core::fmt::Formatter::write_str(f, "QuestionDash"),
BinaryOperator::QuestionDashPipe =>
::core::fmt::Formatter::write_str(f, "QuestionDashPipe"),
BinaryOperator::QuestionDoublePipe =>
::core::fmt::Formatter::write_str(f, "QuestionDoublePipe"),
BinaryOperator::At => ::core::fmt::Formatter::write_str(f, "At"),
BinaryOperator::TildeEq =>
::core::fmt::Formatter::write_str(f, "TildeEq"),
BinaryOperator::Assignment =>
::core::fmt::Formatter::write_str(f, "Assignment"),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for BinaryOperator {
#[inline]
fn clone(&self) -> BinaryOperator {
match self {
BinaryOperator::Plus => BinaryOperator::Plus,
BinaryOperator::Minus => BinaryOperator::Minus,
BinaryOperator::Multiply => BinaryOperator::Multiply,
BinaryOperator::Divide => BinaryOperator::Divide,
BinaryOperator::Modulo => BinaryOperator::Modulo,
BinaryOperator::StringConcat => BinaryOperator::StringConcat,
BinaryOperator::Gt => BinaryOperator::Gt,
BinaryOperator::Lt => BinaryOperator::Lt,
BinaryOperator::GtEq => BinaryOperator::GtEq,
BinaryOperator::LtEq => BinaryOperator::LtEq,
BinaryOperator::Spaceship => BinaryOperator::Spaceship,
BinaryOperator::Eq => BinaryOperator::Eq,
BinaryOperator::NotEq => BinaryOperator::NotEq,
BinaryOperator::And => BinaryOperator::And,
BinaryOperator::Or => BinaryOperator::Or,
BinaryOperator::Xor => BinaryOperator::Xor,
BinaryOperator::BitwiseOr => BinaryOperator::BitwiseOr,
BinaryOperator::BitwiseAnd => BinaryOperator::BitwiseAnd,
BinaryOperator::BitwiseXor => BinaryOperator::BitwiseXor,
BinaryOperator::DuckIntegerDivide =>
BinaryOperator::DuckIntegerDivide,
BinaryOperator::MyIntegerDivide =>
BinaryOperator::MyIntegerDivide,
BinaryOperator::Match => BinaryOperator::Match,
BinaryOperator::Regexp => BinaryOperator::Regexp,
BinaryOperator::Custom(__self_0) =>
BinaryOperator::Custom(::core::clone::Clone::clone(__self_0)),
BinaryOperator::PGBitwiseXor => BinaryOperator::PGBitwiseXor,
BinaryOperator::PGBitwiseShiftLeft =>
BinaryOperator::PGBitwiseShiftLeft,
BinaryOperator::PGBitwiseShiftRight =>
BinaryOperator::PGBitwiseShiftRight,
BinaryOperator::PGExp => BinaryOperator::PGExp,
BinaryOperator::PGOverlap => BinaryOperator::PGOverlap,
BinaryOperator::PGRegexMatch => BinaryOperator::PGRegexMatch,
BinaryOperator::PGRegexIMatch => BinaryOperator::PGRegexIMatch,
BinaryOperator::PGRegexNotMatch =>
BinaryOperator::PGRegexNotMatch,
BinaryOperator::PGRegexNotIMatch =>
BinaryOperator::PGRegexNotIMatch,
BinaryOperator::PGLikeMatch => BinaryOperator::PGLikeMatch,
BinaryOperator::PGILikeMatch => BinaryOperator::PGILikeMatch,
BinaryOperator::PGNotLikeMatch => BinaryOperator::PGNotLikeMatch,
BinaryOperator::PGNotILikeMatch =>
BinaryOperator::PGNotILikeMatch,
BinaryOperator::PGStartsWith => BinaryOperator::PGStartsWith,
BinaryOperator::Arrow => BinaryOperator::Arrow,
BinaryOperator::LongArrow => BinaryOperator::LongArrow,
BinaryOperator::HashArrow => BinaryOperator::HashArrow,
BinaryOperator::HashLongArrow => BinaryOperator::HashLongArrow,
BinaryOperator::AtAt => BinaryOperator::AtAt,
BinaryOperator::AtArrow => BinaryOperator::AtArrow,
BinaryOperator::ArrowAt => BinaryOperator::ArrowAt,
BinaryOperator::HashMinus => BinaryOperator::HashMinus,
BinaryOperator::AtQuestion => BinaryOperator::AtQuestion,
BinaryOperator::Question => BinaryOperator::Question,
BinaryOperator::QuestionAnd => BinaryOperator::QuestionAnd,
BinaryOperator::QuestionPipe => BinaryOperator::QuestionPipe,
BinaryOperator::PGCustomBinaryOperator(__self_0) =>
BinaryOperator::PGCustomBinaryOperator(::core::clone::Clone::clone(__self_0)),
BinaryOperator::Overlaps => BinaryOperator::Overlaps,
BinaryOperator::DoubleHash => BinaryOperator::DoubleHash,
BinaryOperator::LtDashGt => BinaryOperator::LtDashGt,
BinaryOperator::AndLt => BinaryOperator::AndLt,
BinaryOperator::AndGt => BinaryOperator::AndGt,
BinaryOperator::LtLtPipe => BinaryOperator::LtLtPipe,
BinaryOperator::PipeGtGt => BinaryOperator::PipeGtGt,
BinaryOperator::AndLtPipe => BinaryOperator::AndLtPipe,
BinaryOperator::PipeAndGt => BinaryOperator::PipeAndGt,
BinaryOperator::LtCaret => BinaryOperator::LtCaret,
BinaryOperator::GtCaret => BinaryOperator::GtCaret,
BinaryOperator::QuestionHash => BinaryOperator::QuestionHash,
BinaryOperator::QuestionDash => BinaryOperator::QuestionDash,
BinaryOperator::QuestionDashPipe =>
BinaryOperator::QuestionDashPipe,
BinaryOperator::QuestionDoublePipe =>
BinaryOperator::QuestionDoublePipe,
BinaryOperator::At => BinaryOperator::At,
BinaryOperator::TildeEq => BinaryOperator::TildeEq,
BinaryOperator::Assignment => BinaryOperator::Assignment,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for BinaryOperator {
#[inline]
fn eq(&self, other: &BinaryOperator) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(BinaryOperator::Custom(__self_0),
BinaryOperator::Custom(__arg1_0)) => __self_0 == __arg1_0,
(BinaryOperator::PGCustomBinaryOperator(__self_0),
BinaryOperator::PGCustomBinaryOperator(__arg1_0)) =>
__self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for BinaryOperator {
#[inline]
fn partial_cmp(&self, other: &BinaryOperator)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(BinaryOperator::Custom(__self_0),
BinaryOperator::Custom(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(BinaryOperator::PGCustomBinaryOperator(__self_0),
BinaryOperator::PGCustomBinaryOperator(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for BinaryOperator {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_fields_are_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<String>;
let _: ::core::cmp::AssertParamIsEq<Vec<String>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for BinaryOperator {
#[inline]
fn cmp(&self, other: &BinaryOperator) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(BinaryOperator::Custom(__self_0),
BinaryOperator::Custom(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(BinaryOperator::PGCustomBinaryOperator(__self_0),
BinaryOperator::PGCustomBinaryOperator(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for BinaryOperator {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
BinaryOperator::Custom(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
BinaryOperator::PGCustomBinaryOperator(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
97#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
98#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for BinaryOperator {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
::recursive::get_stack_allocation_size(),
move || -> ::std::ops::ControlFlow<V::Break>
{
{
match self {
Self::Plus => {}
Self::Minus => {}
Self::Multiply => {}
Self::Divide => {}
Self::Modulo => {}
Self::StringConcat => {}
Self::Gt => {}
Self::Lt => {}
Self::GtEq => {}
Self::LtEq => {}
Self::Spaceship => {}
Self::Eq => {}
Self::NotEq => {}
Self::And => {}
Self::Or => {}
Self::Xor => {}
Self::BitwiseOr => {}
Self::BitwiseAnd => {}
Self::BitwiseXor => {}
Self::DuckIntegerDivide => {}
Self::MyIntegerDivide => {}
Self::Match => {}
Self::Regexp => {}
Self::Custom(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::PGBitwiseXor => {}
Self::PGBitwiseShiftLeft => {}
Self::PGBitwiseShiftRight => {}
Self::PGExp => {}
Self::PGOverlap => {}
Self::PGRegexMatch => {}
Self::PGRegexIMatch => {}
Self::PGRegexNotMatch => {}
Self::PGRegexNotIMatch => {}
Self::PGLikeMatch => {}
Self::PGILikeMatch => {}
Self::PGNotLikeMatch => {}
Self::PGNotILikeMatch => {}
Self::PGStartsWith => {}
Self::Arrow => {}
Self::LongArrow => {}
Self::HashArrow => {}
Self::HashLongArrow => {}
Self::AtAt => {}
Self::AtArrow => {}
Self::ArrowAt => {}
Self::HashMinus => {}
Self::AtQuestion => {}
Self::Question => {}
Self::QuestionAnd => {}
Self::QuestionPipe => {}
Self::PGCustomBinaryOperator(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Overlaps => {}
Self::DoubleHash => {}
Self::LtDashGt => {}
Self::AndLt => {}
Self::AndGt => {}
Self::LtLtPipe => {}
Self::PipeGtGt => {}
Self::AndLtPipe => {}
Self::PipeAndGt => {}
Self::LtCaret => {}
Self::GtCaret => {}
Self::QuestionHash => {}
Self::QuestionDash => {}
Self::QuestionDashPipe => {}
Self::QuestionDoublePipe => {}
Self::At => {}
Self::TildeEq => {}
Self::Assignment => {}
}
::std::ops::ControlFlow::Continue(())
}
})
}
}Visit, impl sqlparser::ast::VisitMut for BinaryOperator {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
::recursive::get_stack_allocation_size(),
move || -> ::std::ops::ControlFlow<V::Break>
{
{
match self {
Self::Plus => {}
Self::Minus => {}
Self::Multiply => {}
Self::Divide => {}
Self::Modulo => {}
Self::StringConcat => {}
Self::Gt => {}
Self::Lt => {}
Self::GtEq => {}
Self::LtEq => {}
Self::Spaceship => {}
Self::Eq => {}
Self::NotEq => {}
Self::And => {}
Self::Or => {}
Self::Xor => {}
Self::BitwiseOr => {}
Self::BitwiseAnd => {}
Self::BitwiseXor => {}
Self::DuckIntegerDivide => {}
Self::MyIntegerDivide => {}
Self::Match => {}
Self::Regexp => {}
Self::Custom(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::PGBitwiseXor => {}
Self::PGBitwiseShiftLeft => {}
Self::PGBitwiseShiftRight => {}
Self::PGExp => {}
Self::PGOverlap => {}
Self::PGRegexMatch => {}
Self::PGRegexIMatch => {}
Self::PGRegexNotMatch => {}
Self::PGRegexNotIMatch => {}
Self::PGLikeMatch => {}
Self::PGILikeMatch => {}
Self::PGNotLikeMatch => {}
Self::PGNotILikeMatch => {}
Self::PGStartsWith => {}
Self::Arrow => {}
Self::LongArrow => {}
Self::HashArrow => {}
Self::HashLongArrow => {}
Self::AtAt => {}
Self::AtArrow => {}
Self::ArrowAt => {}
Self::HashMinus => {}
Self::AtQuestion => {}
Self::Question => {}
Self::QuestionAnd => {}
Self::QuestionPipe => {}
Self::PGCustomBinaryOperator(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Overlaps => {}
Self::DoubleHash => {}
Self::LtDashGt => {}
Self::AndLt => {}
Self::AndGt => {}
Self::LtLtPipe => {}
Self::PipeGtGt => {}
Self::AndLtPipe => {}
Self::PipeAndGt => {}
Self::LtCaret => {}
Self::GtCaret => {}
Self::QuestionHash => {}
Self::QuestionDash => {}
Self::QuestionDashPipe => {}
Self::QuestionDoublePipe => {}
Self::At => {}
Self::TildeEq => {}
Self::Assignment => {}
}
::std::ops::ControlFlow::Continue(())
}
})
}
}VisitMut))]
99pub enum BinaryOperator {
100 Plus,
102 Minus,
104 Multiply,
106 Divide,
108 Modulo,
110 StringConcat,
112 Gt,
114 Lt,
116 GtEq,
118 LtEq,
120 Spaceship,
122 Eq,
124 NotEq,
126 And,
128 Or,
130 Xor,
132 BitwiseOr,
134 BitwiseAnd,
136 BitwiseXor,
138 DuckIntegerDivide,
140 MyIntegerDivide,
142 Match,
145 Regexp,
147 Custom(String),
149 PGBitwiseXor,
151 PGBitwiseShiftLeft,
153 PGBitwiseShiftRight,
155 PGExp,
157 PGOverlap,
159 PGRegexMatch,
161 PGRegexIMatch,
163 PGRegexNotMatch,
165 PGRegexNotIMatch,
167 PGLikeMatch,
169 PGILikeMatch,
171 PGNotLikeMatch,
173 PGNotILikeMatch,
175 PGStartsWith,
177 Arrow,
185 LongArrow,
193 HashArrow,
204 HashLongArrow,
215 AtAt,
222 AtArrow,
229 ArrowAt,
236 HashMinus,
243 AtQuestion,
250 Question,
257 QuestionAnd,
264 QuestionPipe,
271 PGCustomBinaryOperator(Vec<String>),
276 Overlaps,
281 DoubleHash,
284 LtDashGt,
287 AndLt,
290 AndGt,
293 LtLtPipe,
296 PipeGtGt,
299 AndLtPipe,
302 PipeAndGt,
305 LtCaret,
308 GtCaret,
311 QuestionHash,
314 QuestionDash,
317 QuestionDashPipe,
320 QuestionDoublePipe,
323 At,
326 TildeEq,
329 Assignment,
332}
333
334impl fmt::Display for BinaryOperator {
335 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
336 match self {
337 BinaryOperator::Plus => f.write_str("+"),
338 BinaryOperator::Minus => f.write_str("-"),
339 BinaryOperator::Multiply => f.write_str("*"),
340 BinaryOperator::Divide => f.write_str("/"),
341 BinaryOperator::Modulo => f.write_str("%"),
342 BinaryOperator::StringConcat => f.write_str("||"),
343 BinaryOperator::Gt => f.write_str(">"),
344 BinaryOperator::Lt => f.write_str("<"),
345 BinaryOperator::GtEq => f.write_str(">="),
346 BinaryOperator::LtEq => f.write_str("<="),
347 BinaryOperator::Spaceship => f.write_str("<=>"),
348 BinaryOperator::Eq => f.write_str("="),
349 BinaryOperator::NotEq => f.write_str("<>"),
350 BinaryOperator::And => f.write_str("AND"),
351 BinaryOperator::Or => f.write_str("OR"),
352 BinaryOperator::Xor => f.write_str("XOR"),
353 BinaryOperator::BitwiseOr => f.write_str("|"),
354 BinaryOperator::BitwiseAnd => f.write_str("&"),
355 BinaryOperator::BitwiseXor => f.write_str("^"),
356 BinaryOperator::DuckIntegerDivide => f.write_str("//"),
357 BinaryOperator::MyIntegerDivide => f.write_str("DIV"),
358 BinaryOperator::Match => f.write_str("MATCH"),
359 BinaryOperator::Regexp => f.write_str("REGEXP"),
360 BinaryOperator::Custom(s) => f.write_str(s),
361 BinaryOperator::PGBitwiseXor => f.write_str("#"),
362 BinaryOperator::PGBitwiseShiftLeft => f.write_str("<<"),
363 BinaryOperator::PGBitwiseShiftRight => f.write_str(">>"),
364 BinaryOperator::PGExp => f.write_str("^"),
365 BinaryOperator::PGOverlap => f.write_str("&&"),
366 BinaryOperator::PGRegexMatch => f.write_str("~"),
367 BinaryOperator::PGRegexIMatch => f.write_str("~*"),
368 BinaryOperator::PGRegexNotMatch => f.write_str("!~"),
369 BinaryOperator::PGRegexNotIMatch => f.write_str("!~*"),
370 BinaryOperator::PGLikeMatch => f.write_str("~~"),
371 BinaryOperator::PGILikeMatch => f.write_str("~~*"),
372 BinaryOperator::PGNotLikeMatch => f.write_str("!~~"),
373 BinaryOperator::PGNotILikeMatch => f.write_str("!~~*"),
374 BinaryOperator::PGStartsWith => f.write_str("^@"),
375 BinaryOperator::Arrow => f.write_str("->"),
376 BinaryOperator::LongArrow => f.write_str("->>"),
377 BinaryOperator::HashArrow => f.write_str("#>"),
378 BinaryOperator::HashLongArrow => f.write_str("#>>"),
379 BinaryOperator::AtAt => f.write_str("@@"),
380 BinaryOperator::AtArrow => f.write_str("@>"),
381 BinaryOperator::ArrowAt => f.write_str("<@"),
382 BinaryOperator::HashMinus => f.write_str("#-"),
383 BinaryOperator::AtQuestion => f.write_str("@?"),
384 BinaryOperator::Question => f.write_str("?"),
385 BinaryOperator::QuestionAnd => f.write_str("?&"),
386 BinaryOperator::QuestionPipe => f.write_str("?|"),
387 BinaryOperator::PGCustomBinaryOperator(idents) => {
388 f.write_fmt(format_args!("OPERATOR({0})", display_separated(idents, ".")))write!(f, "OPERATOR({})", display_separated(idents, "."))
389 }
390 BinaryOperator::Overlaps => f.write_str("OVERLAPS"),
391 BinaryOperator::DoubleHash => f.write_str("##"),
392 BinaryOperator::LtDashGt => f.write_str("<->"),
393 BinaryOperator::AndLt => f.write_str("&<"),
394 BinaryOperator::AndGt => f.write_str("&>"),
395 BinaryOperator::LtLtPipe => f.write_str("<<|"),
396 BinaryOperator::PipeGtGt => f.write_str("|>>"),
397 BinaryOperator::AndLtPipe => f.write_str("&<|"),
398 BinaryOperator::PipeAndGt => f.write_str("|&>"),
399 BinaryOperator::LtCaret => f.write_str("<^"),
400 BinaryOperator::GtCaret => f.write_str(">^"),
401 BinaryOperator::QuestionHash => f.write_str("?#"),
402 BinaryOperator::QuestionDash => f.write_str("?-"),
403 BinaryOperator::QuestionDashPipe => f.write_str("?-|"),
404 BinaryOperator::QuestionDoublePipe => f.write_str("?||"),
405 BinaryOperator::At => f.write_str("@"),
406 BinaryOperator::TildeEq => f.write_str("~="),
407 BinaryOperator::Assignment => f.write_str(":="),
408 }
409 }
410}