@@ -33,35 +33,35 @@ use super::display_separated;
3333#[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
3434#[ cfg_attr( feature = "visitor" , derive( Visit , VisitMut ) ) ]
3535pub enum UnaryOperator {
36+ /// `@-@` Length or circumference (PostgreSQL/Redshift geometric operator)
37+ /// see <https://www.postgresql.org/docs/9.5/functions-geometry.html>
38+ AtDashAt ,
39+ /// Unary logical not operator: e.g. `! false` (Hive-specific)
40+ BangNot ,
41+ /// Bitwise Not, e.g. `~9`
42+ BitwiseNot ,
43+ /// `@@` Center (PostgreSQL/Redshift geometric operator)
44+ /// see <https://www.postgresql.org/docs/9.5/functions-geometry.html>
45+ DoubleAt ,
46+ /// `#` Number of points in path or polygon (PostgreSQL/Redshift geometric operator)
47+ /// see <https://www.postgresql.org/docs/9.5/functions-geometry.html>
48+ Hash ,
3649 /// Plus, e.g. `+9`
3750 Plus ,
3851 /// Minus, e.g. `-9`
3952 Minus ,
4053 /// Not, e.g. `NOT(true)`
4154 Not ,
42- /// Bitwise Not, e.g. `~9` (PostgreSQL-specific)
43- PGBitwiseNot ,
44- /// Square root, e.g. `|/9` (PostgreSQL-specific)
45- PGSquareRoot ,
55+ /// Absolute value, e.g. `@ -9` (PostgreSQL-specific)
56+ PGAbs ,
4657 /// Cube root, e.g. `||/27` (PostgreSQL-specific)
4758 PGCubeRoot ,
4859 /// Factorial, e.g. `9!` (PostgreSQL-specific)
4960 PGPostfixFactorial ,
5061 /// Factorial, e.g. `!!9` (PostgreSQL-specific)
5162 PGPrefixFactorial ,
52- /// Absolute value, e.g. `@ -9` (PostgreSQL-specific)
53- PGAbs ,
54- /// Unary logical not operator: e.g. `! false` (Hive-specific)
55- BangNot ,
56- /// `#` Number of points in path or polygon (PostgreSQL/Redshift geometric operator)
57- /// see <https://www.postgresql.org/docs/9.5/functions-geometry.html>
58- Hash ,
59- /// `@-@` Length or circumference (PostgreSQL/Redshift geometric operator)
60- /// see <https://www.postgresql.org/docs/9.5/functions-geometry.html>
61- AtDashAt ,
62- /// `@@` Center (PostgreSQL/Redshift geometric operator)
63- /// see <https://www.postgresql.org/docs/9.5/functions-geometry.html>
64- DoubleAt ,
63+ /// Square root, e.g. `|/9` (PostgreSQL-specific)
64+ PGSquareRoot ,
6565 /// `?-` Is horizontal? (PostgreSQL/Redshift geometric operator)
6666 /// see <https://www.postgresql.org/docs/9.5/functions-geometry.html>
6767 QuestionDash ,
@@ -73,19 +73,19 @@ pub enum UnaryOperator {
7373impl fmt:: Display for UnaryOperator {
7474 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
7575 f. write_str ( match self {
76- UnaryOperator :: Plus => "+" ,
76+ UnaryOperator :: AtDashAt => "@-@" ,
77+ UnaryOperator :: BangNot => "!" ,
78+ UnaryOperator :: BitwiseNot => "~" ,
79+ UnaryOperator :: DoubleAt => "@@" ,
80+ UnaryOperator :: Hash => "#" ,
7781 UnaryOperator :: Minus => "-" ,
7882 UnaryOperator :: Not => "NOT" ,
79- UnaryOperator :: PGBitwiseNot => "~" ,
80- UnaryOperator :: PGSquareRoot => "|/" ,
83+ UnaryOperator :: PGAbs => "@" ,
8184 UnaryOperator :: PGCubeRoot => "||/" ,
8285 UnaryOperator :: PGPostfixFactorial => "!" ,
8386 UnaryOperator :: PGPrefixFactorial => "!!" ,
84- UnaryOperator :: PGAbs => "@" ,
85- UnaryOperator :: BangNot => "!" ,
86- UnaryOperator :: Hash => "#" ,
87- UnaryOperator :: AtDashAt => "@-@" ,
88- UnaryOperator :: DoubleAt => "@@" ,
87+ UnaryOperator :: PGSquareRoot => "|/" ,
88+ UnaryOperator :: Plus => "+" ,
8989 UnaryOperator :: QuestionDash => "?-" ,
9090 UnaryOperator :: QuestionPipe => "?|" ,
9191 } )
0 commit comments