aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-07-27 20:53:53 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-07-27 20:53:53 -0700
commit9e2a02d397ce05539cb409013934a7c0bca06d41 (patch)
treeb2df8c63780e70babc6277bcda5357c75a8f443b /lib
parentbf6fbc4591bd7fe696f48f1db06eec714c0ec790 (diff)
downloadrails-9e2a02d397ce05539cb409013934a7c0bca06d41.tar.gz
rails-9e2a02d397ce05539cb409013934a7c0bca06d41.tar.bz2
rails-9e2a02d397ce05539cb409013934a7c0bca06d41.zip
speed up method lookup
Diffstat (limited to 'lib')
-rw-r--r--lib/arel/algebra/attributes/attribute.rb181
1 files changed, 89 insertions, 92 deletions
diff --git a/lib/arel/algebra/attributes/attribute.rb b/lib/arel/algebra/attributes/attribute.rb
index 770e0950c5..317b7e79f1 100644
--- a/lib/arel/algebra/attributes/attribute.rb
+++ b/lib/arel/algebra/attributes/attribute.rb
@@ -96,128 +96,125 @@ module Arel
end
include Congruence
- module Predications
- def eq(other)
- Predicates::Equality.new(self, other)
- end
+ def eq(other)
+ Predicates::Equality.new(self, other)
+ end
- def eq_any(*others)
- Predicates::Any.build(Predicates::Equality, self, *others)
- end
+ def eq_any(*others)
+ Predicates::Any.build(Predicates::Equality, self, *others)
+ end
- def eq_all(*others)
- Predicates::All.build(Predicates::Equality, self, *others)
- end
+ def eq_all(*others)
+ Predicates::All.build(Predicates::Equality, self, *others)
+ end
- def not_eq(other)
- Predicates::Inequality.new(self, other)
- end
+ def not_eq(other)
+ Predicates::Inequality.new(self, other)
+ end
- def not_eq_any(*others)
- Predicates::Any.build(Predicates::Inequality, self, *others)
- end
+ def not_eq_any(*others)
+ Predicates::Any.build(Predicates::Inequality, self, *others)
+ end
- def not_eq_all(*others)
- Predicates::All.build(Predicates::Inequality, self, *others)
- end
+ def not_eq_all(*others)
+ Predicates::All.build(Predicates::Inequality, self, *others)
+ end
- def lt(other)
- Predicates::LessThan.new(self, other)
- end
+ def lt(other)
+ Predicates::LessThan.new(self, other)
+ end
- def lt_any(*others)
- Predicates::Any.build(Predicates::LessThan, self, *others)
- end
+ def lt_any(*others)
+ Predicates::Any.build(Predicates::LessThan, self, *others)
+ end
- def lt_all(*others)
- Predicates::All.build(Predicates::LessThan, self, *others)
- end
+ def lt_all(*others)
+ Predicates::All.build(Predicates::LessThan, self, *others)
+ end
- def lteq(other)
- Predicates::LessThanOrEqualTo.new(self, other)
- end
+ def lteq(other)
+ Predicates::LessThanOrEqualTo.new(self, other)
+ end
- def lteq_any(*others)
- Predicates::Any.build(Predicates::LessThanOrEqualTo, self, *others)
- end
+ def lteq_any(*others)
+ Predicates::Any.build(Predicates::LessThanOrEqualTo, self, *others)
+ end
- def lteq_all(*others)
- Predicates::All.build(Predicates::LessThanOrEqualTo, self, *others)
- end
+ def lteq_all(*others)
+ Predicates::All.build(Predicates::LessThanOrEqualTo, self, *others)
+ end
- def gt(other)
- Predicates::GreaterThan.new(self, other)
- end
+ def gt(other)
+ Predicates::GreaterThan.new(self, other)
+ end
- def gt_any(*others)
- Predicates::Any.build(Predicates::GreaterThan, self, *others)
- end
+ def gt_any(*others)
+ Predicates::Any.build(Predicates::GreaterThan, self, *others)
+ end
- def gt_all(*others)
- Predicates::All.build(Predicates::GreaterThan, self, *others)
- end
+ def gt_all(*others)
+ Predicates::All.build(Predicates::GreaterThan, self, *others)
+ end
- def gteq(other)
- Predicates::GreaterThanOrEqualTo.new(self, other)
- end
+ def gteq(other)
+ Predicates::GreaterThanOrEqualTo.new(self, other)
+ end
- def gteq_any(*others)
- Predicates::Any.build(Predicates::GreaterThanOrEqualTo, self, *others)
- end
+ def gteq_any(*others)
+ Predicates::Any.build(Predicates::GreaterThanOrEqualTo, self, *others)
+ end
- def gteq_all(*others)
- Predicates::All.build(Predicates::GreaterThanOrEqualTo, self, *others)
- end
+ def gteq_all(*others)
+ Predicates::All.build(Predicates::GreaterThanOrEqualTo, self, *others)
+ end
- def matches(other)
- Predicates::Match.new(self, other)
- end
+ def matches(other)
+ Predicates::Match.new(self, other)
+ end
- def matches_any(*others)
- Predicates::Any.build(Predicates::Match, self, *others)
- end
+ def matches_any(*others)
+ Predicates::Any.build(Predicates::Match, self, *others)
+ end
- def matches_all(*others)
- Predicates::All.build(Predicates::Match, self, *others)
- end
+ def matches_all(*others)
+ Predicates::All.build(Predicates::Match, self, *others)
+ end
- def not_matches(other)
- Predicates::NotMatch.new(self, other)
- end
+ def not_matches(other)
+ Predicates::NotMatch.new(self, other)
+ end
- def not_matches_any(*others)
- Predicates::Any.build(Predicates::NotMatch, self, *others)
- end
+ def not_matches_any(*others)
+ Predicates::Any.build(Predicates::NotMatch, self, *others)
+ end
- def not_matches_all(*others)
- Predicates::All.build(Predicates::NotMatch, self, *others)
- end
+ def not_matches_all(*others)
+ Predicates::All.build(Predicates::NotMatch, self, *others)
+ end
- def in(other)
- Predicates::In.new(self, other)
- end
+ def in(other)
+ Predicates::In.new(self, other)
+ end
- def in_any(*others)
- Predicates::Any.build(Predicates::In, self, *others)
- end
+ def in_any(*others)
+ Predicates::Any.build(Predicates::In, self, *others)
+ end
- def in_all(*others)
- Predicates::All.build(Predicates::In, self, *others)
- end
+ def in_all(*others)
+ Predicates::All.build(Predicates::In, self, *others)
+ end
- def not_in(other)
- Predicates::NotIn.new(self, other)
- end
+ def not_in(other)
+ Predicates::NotIn.new(self, other)
+ end
- def not_in_any(*others)
- Predicates::Any.build(Predicates::NotIn, self, *others)
- end
+ def not_in_any(*others)
+ Predicates::Any.build(Predicates::NotIn, self, *others)
+ end
- def not_in_all(*others)
- Predicates::All.build(Predicates::NotIn, self, *others)
- end
+ def not_in_all(*others)
+ Predicates::All.build(Predicates::NotIn, self, *others)
end
- include Predications
module Expressions
def count(distinct = false)