Sha256: f5e8dda41e3b6113a41d310cc96564d127379fec92537cc029b65f42dc93fd6b

Contents?: true

Size: 803 Bytes

Versions: 6

Compression:

Stored size: 803 Bytes

Contents

require 'arel/predications'

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

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

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

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

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

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

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
postgres_ext-3.0.0 lib/postgres_ext/arel/4.1/predications.rb
postgres_ext-2.4.1 lib/postgres_ext/arel/4.1/predications.rb
postgres_ext-2.4.0 lib/postgres_ext/arel/4.1/predications.rb
postgres_ext-2.4.0.beta.1 lib/postgres_ext/arel/4.1/predications.rb
postgres_ext-2.3.0 lib/postgres_ext/arel/predications.rb
postgres_ext-2.2.0 lib/postgres_ext/arel/predications.rb