Module: Arel::Predications

Defined in:
lib/postgres_ext/arel/predications.rb

Instance Method Summary collapse

Instance Method Details

#all(other) ⇒ Object



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

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

#any(other) ⇒ Object



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

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

#contained_within(other) ⇒ Object



5
6
7
# File 'lib/postgres_ext/arel/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/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/predications.rb', line 13

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

#contains_or_equals(other) ⇒ Object



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

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

#overlap(other) ⇒ Object



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

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