aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/arel/nodes/unary_operation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/arel/nodes/unary_operation.rb')
-rw-r--r--activerecord/lib/arel/nodes/unary_operation.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/activerecord/lib/arel/nodes/unary_operation.rb b/activerecord/lib/arel/nodes/unary_operation.rb
new file mode 100644
index 0000000000..524282ac84
--- /dev/null
+++ b/activerecord/lib/arel/nodes/unary_operation.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+module Arel # :nodoc: all
+ module Nodes
+ class UnaryOperation < Unary
+ attr_reader :operator
+
+ def initialize(operator, operand)
+ super(operand)
+ @operator = operator
+ end
+ end
+
+ class BitwiseNot < UnaryOperation
+ def initialize(operand)
+ super(:~, operand)
+ end
+ end
+ end
+end