Sha256: a6b0962cf422ee3eb1c78f80383203a5d994053b04836b6edf9b46e197ffaf94
Contents?: true
Size: 495 Bytes
Versions: 23
Compression:
Stored size: 495 Bytes
Contents
module ActiveRecord::Turntable class ConnectionProxy module Mixable extend ActiveSupport::Concern METHODS_REGEXP = /\A(insert|select|update|delete|exec_)/ EXCLUDE_QUERY_REGEXP = /\A\s*SHOW/i QUERY_REGEXP = /\A\s*(INSERT|DELETE|UPDATE|SELECT)/i def mixable?(method, *args) (method.to_s =~ METHODS_REGEXP && args.first !~ EXCLUDE_QUERY_REGEXP) || (method.to_s == 'execute' && args.first =~ QUERY_REGEXP) end end end end
Version data entries
23 entries across 23 versions & 1 rubygems