Module: RuboCop::Cop::Isucon::Mixin::ManyJoinTableMethods

Included in:
RuboCop::Cop::Isucon::Mysql2::ManyJoinTable, Sqlite3::ManyJoinTable
Defined in:
lib/rubocop/cop/isucon/mixin/many_join_table_methods.rb

Overview

Constant Summary collapse

MSG =
"Avoid SQL with lots of JOINs"

Instance Method Summary collapse

Instance Method Details

#on_send(node) ⇒ Object

Parameters:

  • node (RuboCop::AST::Node)


13
14
15
16
17
# File 'lib/rubocop/cop/isucon/mixin/many_join_table_methods.rb', line 13

def on_send(node)
  with_db_query(node) do |_, root_gda|
    check_and_register_offence(root_gda: root_gda, node: node)
  end
end