Module: RuboCop::Isucon::GDA

Defined in:
lib/rubocop/isucon/gda.rb,
lib/rubocop/isucon/gda/client.rb,
lib/rubocop/isucon/gda/join_operand.rb,
lib/rubocop/isucon/gda/node_patcher.rb,
lib/rubocop/isucon/gda/node_location.rb,
lib/rubocop/isucon/gda/where_operand.rb,
lib/rubocop/isucon/gda/join_condition.rb,
lib/rubocop/isucon/gda/where_condition.rb

Overview

GDA helper classes

Defined Under Namespace

Classes: Client, JoinCondition, JoinOperand, NodeLocation, NodePatcher, WhereCondition, WhereOperand

Constant Summary collapse

PRACEHOLDER =
"0"

Class Method Summary collapse

Class Method Details

.normalize_sql(sql) ⇒ String

Parameters:

  • sql (String)

Returns:

  • (String)


23
24
25
# File 'lib/rubocop/isucon/gda.rb', line 23

def self.normalize_sql(sql)
  sql.tr("`", " ").gsub("?", PRACEHOLDER)
end