Class: RuboCop::Cop::Isucon::Mysql2::SelectAsterisk
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Isucon::Mysql2::SelectAsterisk
- Extended by:
- AutoCorrector
- Includes:
- RuboCop::Cop::Isucon::Mixin::Mysql2XqueryMethods, RuboCop::Cop::Isucon::Mixin::SelectAsteriskMethods
- Defined in:
- lib/rubocop/cop/isucon/mysql2/select_asterisk.rb
Overview
Note:
If Database
isn't configured, auto-correct will not be available. (Only offense detection can be used)
Note:
This cop replaces SELECT *
with a SELECT
by the columns present in the table (e.g. SELECT id, name
),
but does not check whether the columns are actually used.
Please manually delete unused columns after auto corrected
Avoid SELECT *
in db.xquery
Constant Summary
Constants included from RuboCop::Cop::Isucon::Mixin::SelectAsteriskMethods
RuboCop::Cop::Isucon::Mixin::SelectAsteriskMethods::MSG, RuboCop::Cop::Isucon::Mixin::SelectAsteriskMethods::TODO
Constants included from RuboCop::Cop::Isucon::Mixin::Mysql2XqueryMethods
RuboCop::Cop::Isucon::Mixin::Mysql2XqueryMethods::NON_STRING_WARNING_MSG
Method Summary
Methods included from RuboCop::Cop::Isucon::Mixin::SelectAsteriskMethods
Methods included from RuboCop::Cop::Isucon::Mixin::DatabaseMethods
#connection, #enabled_database?, #find_table_name_from_column_name