aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/nodes
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-08-23 14:44:10 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-08-23 14:44:10 -0700
commitc151df07acc06b06179c2dc6205db029ff9ce001 (patch)
tree24717fd5502ac9fa2634df8694e04aa800d3e287 /lib/arel/nodes
parent3bc3b145aedea216eb84e213bac1017c6090d42b (diff)
downloadrails-c151df07acc06b06179c2dc6205db029ff9ce001.tar.gz
rails-c151df07acc06b06179c2dc6205db029ff9ce001.tar.bz2
rails-c151df07acc06b06179c2dc6205db029ff9ce001.zip
AND nodes are supported
Diffstat (limited to 'lib/arel/nodes')
-rw-r--r--lib/arel/nodes/and.rb6
-rw-r--r--lib/arel/nodes/binary.rb4
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/arel/nodes/and.rb b/lib/arel/nodes/and.rb
new file mode 100644
index 0000000000..80f420b4f1
--- /dev/null
+++ b/lib/arel/nodes/and.rb
@@ -0,0 +1,6 @@
+module Arel
+ module Nodes
+ class And < Arel::Nodes::Binary
+ end
+ end
+end
diff --git a/lib/arel/nodes/binary.rb b/lib/arel/nodes/binary.rb
index fdfcab2d3f..3cd9583e79 100644
--- a/lib/arel/nodes/binary.rb
+++ b/lib/arel/nodes/binary.rb
@@ -12,6 +12,10 @@ module Arel
Nodes::Or.new self, right
end
+ def and right
+ Nodes::And.new self, right
+ end
+
# FIXME: this method should go away. I don't like people calling
# to_sql on non-head nodes. This forces us to walk the AST until we
# can find a node that has a "relation" member.