From 5ab502a755d0031d229278b6f14123c45623dd04 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 7 Sep 2010 16:37:11 -0700 Subject: adding "as" and to_sql to count nodes --- lib/arel/attributes/attribute.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/arel/attributes') diff --git a/lib/arel/attributes/attribute.rb b/lib/arel/attributes/attribute.rb index ff17d6136c..6087dc8e52 100644 --- a/lib/arel/attributes/attribute.rb +++ b/lib/arel/attributes/attribute.rb @@ -8,6 +8,10 @@ module Arel def in other Nodes::In.new self, other end + + def count + Nodes::Count.new [self] + end end class String < Attribute; end @@ -17,4 +21,6 @@ module Arel class Float < Attribute; end class Integer < Attribute; end end + + Attribute = Attributes::Attribute end -- cgit v1.2.3