Module: Arel::Predications

Defined in:
lib/postgres_ext/arel/4.1/predications.rb,
lib/postgres_ext/arel/4.2/predications.rb

Instance Method Summary collapse

Instance Method Details

#all(other) ⇒ Object



34
35
36
37
# File 'lib/postgres_ext/arel/4.1/predications.rb', line 34

def all(other)
  any_tags_function = Arel::Nodes::NamedFunction.new('ALL', [self])
  Arel::Nodes::Equality.new(other, any_tags_function)
end

#any(other) ⇒ Object



29
30
31
32
# File 'lib/postgres_ext/arel/4.1/predications.rb', line 29

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

#contained_in_array(other) ⇒ Object



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

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

#contained_within(other) ⇒ Object



5
6
7
# File 'lib/postgres_ext/arel/4.1/predications.rb', line 5

def contained_within(other)
  Nodes::ContainedWithin.new self, other
end

#contained_within_or_equals(other) ⇒ Object



9
10
11
# File 'lib/postgres_ext/arel/4.1/predications.rb', line 9

def contained_within_or_equals(other)
  Nodes::ContainedWithinEquals.new self, other
end

#contains(other) ⇒ Object



13
14
15
# File 'lib/postgres_ext/arel/4.1/predications.rb', line 13

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

#contains_or_equals(other) ⇒ Object



21
22
23
# File 'lib/postgres_ext/arel/4.1/predications.rb', line 21

def contains_or_equals(other)
  Nodes::ContainsEquals.new self, other
end

#overlap(other) ⇒ Object



25
26
27
# File 'lib/postgres_ext/arel/4.1/predications.rb', line 25

def overlap(other)
  Nodes::Overlap.new self, other
end