Module: SqlSafetyNet::ConnectionAdapter
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/sql_safety_net/connection_adapter.rb
Overview
This module needs to be included with the specific ActiveRecord::ConnectionAdapter class to collect data about all SELECT queries.
Constant Summary collapse
- SELECT_SQL_PATTERN =
/\A\s*SELECT\b/im.freeze
- IGNORED_PAYLOADS =
%w(SCHEMA EXPLAIN CACHE).freeze
Instance Method Summary collapse
Instance Method Details
#select_rows_with_sql_safety_net(sql, name = nil, *args) ⇒ Object
15 16 17 18 19 |
# File 'lib/sql_safety_net/connection_adapter.rb', line 15 def select_rows_with_sql_safety_net(sql, name = nil, *args) analyze_query(sql, name, []) do select_rows_without_sql_safety_net(sql, name, *args) end end |