Module: Arel::Predications

Included in:
Nodes::AggregateFunctionName
Defined in:
lib/active_record_extended/arel/predications.rb

Instance Method Summary collapse

Instance Method Details

#all(other) ⇒ Object



12
13
14
15
# File 'lib/active_record_extended/arel/predications.rb', line 12

def all(other)
  all_tags_function = Arel::Nodes::NamedFunction.new("ALL", [self])
  Arel::Nodes::Equality.new(Nodes.build_quoted(other, self), all_tags_function)
end

#any(other) ⇒ Object



7
8
9
10
# File 'lib/active_record_extended/arel/predications.rb', line 7

def any(other)
  any_tags_function = Arel::Nodes::NamedFunction.new("ANY", [self])
  Arel::Nodes::Equality.new(Nodes.build_quoted(other, self), any_tags_function)
end

#contained_in_array(other) ⇒ Object



26
27
28
# File 'lib/active_record_extended/arel/predications.rb', line 26

def contained_in_array(other)
  Nodes::ContainedInArray.new self, Nodes.build_quoted(other, self)
end

#contains(other) ⇒ Object



22
23
24
# File 'lib/active_record_extended/arel/predications.rb', line 22

def contains(other)
  Nodes::Contains.new self, Nodes.build_quoted(other, self)
end

#inet_contained_within(other) ⇒ Object



38
39
40
# File 'lib/active_record_extended/arel/predications.rb', line 38

def inet_contained_within(other)
  Nodes::Inet::ContainedWithin.new self, Nodes.build_quoted(other, self)
end

#inet_contained_within_or_equals(other) ⇒ Object



42
43
44
# File 'lib/active_record_extended/arel/predications.rb', line 42

def inet_contained_within_or_equals(other)
  Nodes::Inet::ContainedWithinEquals.new self, Nodes.build_quoted(other, self)
end

#inet_contains(other) ⇒ Object



30
31
32
# File 'lib/active_record_extended/arel/predications.rb', line 30

def inet_contains(other)
  Nodes::Inet::Contains.new self, Nodes.build_quoted(other, self)
end

#inet_contains_or_equals(other) ⇒ Object



46
47
48
# File 'lib/active_record_extended/arel/predications.rb', line 46

def inet_contains_or_equals(other)
  Nodes::Inet::ContainsEquals.new self, Nodes.build_quoted(other, self)
end

#inet_contains_or_is_contained_within(other) ⇒ Object



34
35
36
# File 'lib/active_record_extended/arel/predications.rb', line 34

def inet_contains_or_is_contained_within(other)
  Nodes::Inet::ContainsOrContainedWithin.new self, Nodes.build_quoted(other, self)
end

#overlaps(other) ⇒ Object Also known as: overlap



17
18
19
# File 'lib/active_record_extended/arel/predications.rb', line 17

def overlaps(other)
  Nodes::Overlaps.new(self, Nodes.build_quoted(other, self))
end