Module: ArelExtensions::Comparators
- Included in:
- Arel::Nodes::Binary, Arel::Nodes::Equality, Arel::Nodes::Function, Arel::Nodes::Grouping, Arel::Nodes::Unary, Attributes, Nodes::Case, Nodes::Soundex
- Defined in:
- lib/arel_extensions/comparators.rb
Instance Method Summary collapse
-
#!~(other) ⇒ Object
NOT_REGEXP function Negation of Regexp.
- #<(other) ⇒ Object
- #<=(other) ⇒ Object
-
#=~(other) ⇒ Object
REGEXP function Pattern matching using regular expressions.
- #>(other) ⇒ Object
- #>=(other) ⇒ Object
Instance Method Details
#!~(other) ⇒ Object
NOT_REGEXP function Negation of Regexp
30 31 32 33 34 35 |
# File 'lib/arel_extensions/comparators.rb', line 30 def !~(other) # arg = self.relation.engine.connection.schema_cache.columns_hash(self.relation.table_name)[self.name.to_s].type # if arg == :string || arg == :text Arel::Nodes::NotRegexp.new self, convert_regexp(other) # end end |
#<(other) ⇒ Object
11 12 13 |
# File 'lib/arel_extensions/comparators.rb', line 11 def <(other) Arel::Nodes::LessThan.new self, Arel.quoted(other, self) end |
#<=(other) ⇒ Object
15 16 17 |
# File 'lib/arel_extensions/comparators.rb', line 15 def <=(other) Arel::Nodes::LessThanOrEqual.new self, Arel.quoted(other, self) end |
#=~(other) ⇒ Object
REGEXP function Pattern matching using regular expressions
21 22 23 24 25 26 |
# File 'lib/arel_extensions/comparators.rb', line 21 def =~(other) # arg = self.relation.engine.connection.schema_cache.columns_hash(self.relation.table_name)[self.name.to_s].type # if arg == :string || arg == :text Arel::Nodes::Regexp.new self, convert_regexp(other) # end end |