Sha256: 2ad230c98539649b97c0629bf7fbb3059baf57e9970b8259436144395cea411d

Contents?: true

Size: 485 Bytes

Versions: 11

Compression:

Stored size: 485 Bytes

Contents

require "mobility/backends/sequel/query_methods"

module Mobility
  module Backends
    class Sequel::Serialized::QueryMethods < Sequel::QueryMethods
      def initialize(attributes, _)
        super
        attributes_extractor = @attributes_extractor
        cond_checker = Backends::Serialized.attr_checker(attributes_extractor)

        define_method :where do |*cond, &block|
          cond_checker.call(cond.first) || super(*cond, &block)
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
mobility-0.3.6 lib/mobility/backends/sequel/serialized/query_methods.rb
mobility-0.3.5 lib/mobility/backends/sequel/serialized/query_methods.rb
mobility-0.3.4 lib/mobility/backends/sequel/serialized/query_methods.rb
mobility-0.3.3 lib/mobility/backends/sequel/serialized/query_methods.rb
mobility-0.3.2 lib/mobility/backends/sequel/serialized/query_methods.rb
mobility-0.3.1 lib/mobility/backends/sequel/serialized/query_methods.rb
mobility-0.3.0 lib/mobility/backends/sequel/serialized/query_methods.rb
mobility-0.2.3 lib/mobility/backends/sequel/serialized/query_methods.rb
mobility-0.2.2 lib/mobility/backends/sequel/serialized/query_methods.rb
mobility-0.2.1 lib/mobility/backends/sequel/serialized/query_methods.rb
mobility-0.2.0 lib/mobility/backends/sequel/serialized/query_methods.rb