diff options
author | Carl Lerche <carllerche@mac.com> | 2010-03-12 15:25:21 -0800 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-03-12 15:25:21 -0800 |
commit | 0e6888232a19c8c59416490d3da6079e590fab77 (patch) | |
tree | 43f5157375fdcfb449f245f43dcddabd29208243 /lib/arel/algebra | |
parent | e13420c86afb5c31e90cff800f121bd49255b939 (diff) | |
download | rails-0e6888232a19c8c59416490d3da6079e590fab77.tar.gz rails-0e6888232a19c8c59416490d3da6079e590fab77.tar.bz2 rails-0e6888232a19c8c59416490d3da6079e590fab77.zip |
Add support for a NOT predicate
Diffstat (limited to 'lib/arel/algebra')
-rw-r--r-- | lib/arel/algebra/attributes/attribute.rb | 4 | ||||
-rw-r--r-- | lib/arel/algebra/predicates.rb | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/arel/algebra/attributes/attribute.rb b/lib/arel/algebra/attributes/attribute.rb index 03cf44a552..b372be5e1d 100644 --- a/lib/arel/algebra/attributes/attribute.rb +++ b/lib/arel/algebra/attributes/attribute.rb @@ -86,6 +86,10 @@ module Arel Predicates::Equality.new(self, other) end + def not(other) + Predicates::Not.new(self, other) + end + def lt(other) Predicates::LessThan.new(self, other) end diff --git a/lib/arel/algebra/predicates.rb b/lib/arel/algebra/predicates.rb index 8a0b41fa18..700cd6afaa 100644 --- a/lib/arel/algebra/predicates.rb +++ b/lib/arel/algebra/predicates.rb @@ -33,6 +33,7 @@ module Arel end end + class Not < Binary; end class GreaterThanOrEqualTo < Binary; end class GreaterThan < Binary; end class LessThanOrEqualTo < Binary; end |