aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/arel/nodes/values_list.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/arel/nodes/values_list.rb')
-rw-r--r--activerecord/lib/arel/nodes/values_list.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/activerecord/lib/arel/nodes/values_list.rb b/activerecord/lib/arel/nodes/values_list.rb
new file mode 100644
index 0000000000..27109848e4
--- /dev/null
+++ b/activerecord/lib/arel/nodes/values_list.rb
@@ -0,0 +1,24 @@
+# frozen_string_literal: true
+
+module Arel # :nodoc: all
+ module Nodes
+ class ValuesList < Node
+ attr_reader :rows
+
+ def initialize(rows)
+ @rows = rows
+ super()
+ end
+
+ def hash
+ @rows.hash
+ end
+
+ def eql?(other)
+ self.class == other.class &&
+ self.rows == other.rows
+ end
+ alias :== :eql?
+ end
+ end
+end