Sha256: 34b167ac789d95ab2e3a88da22b743c2ef1c2cbdda80591d7024af8995569f32
Contents?: true
Size: 661 Bytes
Versions: 2
Compression:
Stored size: 661 Bytes
Contents
require "mobility/backends/sequel/query_methods" module Mobility module Backends class Sequel::Column::QueryMethods < Sequel::QueryMethods def initialize(attributes, _) super q = self %w[exclude or where].each do |method_name| define_method method_name do |*conds, &block| if keys = q.extract_attributes(conds.first) cond = conds.first.dup keys.each { |attr| cond[Column.column_name_for(attr)] = cond.delete(attr) } super(cond, &block) else super(*conds, &block) end end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mobility-0.4.3 | lib/mobility/backends/sequel/column/query_methods.rb |
mobility-0.4.2 | lib/mobility/backends/sequel/column/query_methods.rb |