class ArQueryMatchers::Queries::QueryFilter

An instance of this interface must be provided to the QueryCounter class. it allows one to customize which queries it wants to capture.

Public Instance Methods

filter_map(_name, _sql) click to toggle source

@param _name [String] the name of the ActiveRecord operation (this is sometimes garbage) For example: “User Load”

@param _sql [String] the sql query that was executed For example: “SELECT `users`.* FROM `users` ..”

@return nil or an instance which responds to model_name (see TableName or ModelName) By returning nil we omit the query By not returning nil, we are associating this query with a model_name.

# File lib/ar_query_matchers/queries/query_filter.rb, line 17
def filter_map(_name, _sql)
  raise NotImplementedError
end