Sha256: 9c2cb00393e4dcc97df94bb3c2f1d35ba37f6b50ade0bd2019721bb255ee86da

Contents?: true

Size: 806 Bytes

Versions: 9

Compression:

Stored size: 806 Bytes

Contents

module Rasti
  module DB
    module NQL
      module FilterConditionStrategies
        module Types
          class PGArray

            def self.equal(identifier, values)
              Sequel.&(
                Sequel.pg_array(identifier).contains(Sequel.pg_array(values)),
                Sequel.pg_array(identifier).contained_by(Sequel.pg_array(values))
              )
            end

            def self.not_equal(identifier, values)
              ~equal(identifier, values)
            end

            def self.include(identifier, values)
              Sequel.pg_array(identifier).overlaps Sequel.pg_array(values)
            end

            def self.not_include(identifier, values)
              ~include(identifier, values)
            end

          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rasti-db-4.2.0 lib/rasti/db/nql/filter_condition_strategies/types/pg_array.rb
rasti-db-4.1.1 lib/rasti/db/nql/filter_condition_strategies/types/pg_array.rb
rasti-db-4.1.0 lib/rasti/db/nql/filter_condition_strategies/types/pg_array.rb
rasti-db-4.0.0 lib/rasti/db/nql/filter_condition_strategies/types/pg_array.rb
rasti-db-3.0.0 lib/rasti/db/nql/filter_condition_strategies/types/pg_array.rb
rasti-db-2.3.3 lib/rasti/db/nql/filter_condition_strategies/types/pg_array.rb
rasti-db-2.3.2 lib/rasti/db/nql/filter_condition_strategies/types/pg_array.rb
rasti-db-2.3.1 lib/rasti/db/nql/filter_condition_strategies/types/pg_array.rb
rasti-db-2.3.0 lib/rasti/db/nql/filter_condition_strategies/types/pg_array.rb