Sha256: 6aa9b722aaaa51799d22490f6692f5d6902758f2917131b57b9b17968d2853e1

Contents?: true

Size: 299 Bytes

Versions: 6

Compression:

Stored size: 299 Bytes

Contents

module Mysql2QueryFilter::Mysql2ClientExt
  def self.included(klass)
    klass.class_eval do
      alias query_without_filter query

      def query(*args)
        sql = args.first
        Mysql2QueryFilter.filter(sql, @query_options)
        query_without_filter(*args)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mysql2_query_filter-0.1.0 lib/mysql2_query_filter/mysql2_client_ext.rb
mysql2_query_filter-0.0.7 lib/mysql2_query_filter/mysql2_client_ext.rb
mysql2_query_filter-0.0.6 lib/mysql2_query_filter/mysql2_client_ext.rb
mysql2_query_filter-0.0.5 lib/mysql2_query_filter/mysql2_client_ext.rb
mysql2_query_filter-0.0.4 lib/mysql2_query_filter/mysql2_client_ext.rb
mysql2_query_filter-0.0.3 lib/mysql2_query_filter/mysql2_client_ext.rb