Sha256: 9b9ae192cdc170685caf05c517be155a5127e7e44db1d47feee034857a45bb71
Contents?: true
Size: 581 Bytes
Versions: 75
Compression:
Stored size: 581 Bytes
Contents
module Cucumber module ThinkingSphinx module SqlLogger def self.included(base) base.send :alias_method_chain, :execute, :query_record end IGNORED_SQL = [ /^PRAGMA/, /^SELECT currval/, /^SELECT CAST/, /^SELECT @@IDENTITY/, /^SELECT @@ROWCOUNT/, /^SHOW FIELDS/ ] def execute_with_query_record(sql, name = nil, &block) $queries_executed ||= [] $queries_executed << sql unless IGNORED_SQL.any? { |r| sql =~ r } execute_without_query_record(sql, name, &block) end end end end
Version data entries
75 entries across 75 versions & 13 rubygems