class ActiveRecord::ExplainSubscriber

Experimental RBS support (using type sampling data from the type_fusion project).

# sig/active_record/explain_subscriber.rbs

class ActiveRecord::ExplainSubscriber
  def finish: (String name, String id, Hash payload) -> nil
  def start: (String name, String id, Hash payload) -> nil
end

:nodoc:

def finish(name, id, payload)

Experimental RBS support (using type sampling data from the type_fusion project).

type ActiveRecord__ExplainSubscriber_finish_payload = sql | String | name | String | binds |  | type_casted_binds |  | statement_name | NilClass | async | FalseClass | connection | ActiveRecord::ConnectionAdapters::PostgreSQLAdapter | sql | String | name | String | binds | ActiveRecord::Relation::QueryAttribute | ActiveRecord::Relation::QueryAttribute | type_casted_binds | String | String | statement_name | NilClass | async | FalseClass | connection | ActiveRecord::ConnectionAdapters::PostgreSQLAdapter | sql | String | name | String | binds | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | type_casted_binds | String | String | String | String | String | String | String | String | String | String | String | statement_name | NilClass | async | FalseClass | connection | ActiveRecord::ConnectionAdapters::PostgreSQLAdapter | sql | String | name | String | binds | ActiveRecord::Relation::QueryAttribute | ActiveRecord::Relation::QueryAttribute | ActiveRecord::Relation::QueryAttribute | ActiveModel::Attribute::WithCastValue | ActiveModel::Attribute::WithCastValue | type_casted_binds | FalseClass | TrueClass | TrueClass | Integer | Integer | statement_name | NilClass | async | FalseClass | connection | ActiveRecord::ConnectionAdapters::PostgreSQLAdapter | sql | String | name | String | binds | ActiveModel::Attribute::WithCastValue | type_casted_binds | Integer | statement_name | String | async | FalseClass | connection | ActiveRecord::ConnectionAdapters::PostgreSQLAdapter | sql | String | name | String | binds | ActiveRecord::Relation::QueryAttribute | ActiveRecord::Relation::QueryAttribute | type_casted_binds | String | String | statement_name | String | async | FalseClass | connection | ActiveRecord::ConnectionAdapters::PostgreSQLAdapter | sql | String | name | String | binds | ActiveRecord::Relation::QueryAttribute | ActiveRecord::Relation::QueryAttribute | ActiveModel::Attribute::WithCastValue | type_casted_binds | String | String | Integer | statement_name | NilClass | async | FalseClass | connection | ActiveRecord::ConnectionAdapters::PostgreSQLAdapter | sql | String | name | String | binds | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | ActiveModel::Attribute::FromUser | type_casted_binds | String | String | String | String | String | String | String | String | String | String | NilClass | statement_name | NilClass | async | FalseClass | connection | ActiveRecord::ConnectionAdapters::PostgreSQLAdapter | sql | String | binds | ActiveRecord::Relation::QueryAttribute | type_casted_binds | Proc | name | String | connection | ActiveRecord::ConnectionAdapters::PostgreSQLAdapter | cached | TrueClass | sql | String | name | String | binds |  | type_casted_binds |  | statement_name | NilClass | async | FalseClass | connection | ActiveRecord::ConnectionAdapters::SQLite3Adapter

def finish: (String name, String id, ActiveRecord__ExplainSubscriber_finish_payload payload) -> nil

This signature was generated using 59 samples from 3 applications.

def finish(name, id, payload)
  if ExplainRegistry.collect? && !ignore_payload?(payload)
    ExplainRegistry.queries << payload.values_at(:sql, :binds)
  end
end

def ignore_payload?(payload)

def ignore_payload?(payload)
  payload[:exception] ||
    payload[:cached] ||
    IGNORED_PAYLOADS.include?(payload[:name]) ||
    !payload[:sql].match?(EXPLAINED_SQLS)
end

def start(name, id, payload)

Experimental RBS support (using type sampling data from the type_fusion project).

type ActiveRecord__ExplainSubscriber_start_payload = sql | String | name | String | binds |  | type_casted_binds |  | statement_name | NilClass | async | FalseClass | connection | ActiveRecord::ConnectionAdapters::PostgreSQLAdapter | sql | String | name | String | binds | ActiveRecord::Relation::QueryAttribute | ActiveRecord::Relation::QueryAttribute | type_casted_binds | String | String | statement_name | NilClass | async | FalseClass | connection | ActiveRecord::ConnectionAdapters::PostgreSQLAdapter | sql | String | name | String | binds | ActiveRecord::Relation::QueryAttribute | ActiveRecord::Relation::QueryAttribute | type_casted_binds | String | String | statement_name | String | async | FalseClass | connection | ActiveRecord::ConnectionAdapters::PostgreSQLAdapter | sql | String | name | NilClass | binds |  | type_casted_binds |  | statement_name | NilClass | async | FalseClass | connection | ActiveRecord::ConnectionAdapters::SQLite3Adapter | sql | String | name | String | binds | ActiveRecord::Relation::QueryAttribute | ActiveModel::Attribute::WithCastValue | type_casted_binds | Integer | Integer | statement_name | String | async | FalseClass | connection | ActiveRecord::ConnectionAdapters::PostgreSQLAdapter | sql | String | name | String | binds |  | type_casted_binds |  | statement_name | String | async | FalseClass | connection | ActiveRecord::ConnectionAdapters::PostgreSQLAdapter

def start: (String name, String id, ActiveRecord__ExplainSubscriber_start_payload payload) -> nil

This signature was generated using 57 samples from 3 applications.

:nodoc:
def start(name, id, payload)
  # unused
end