Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid extra BindParam allocation to generate placeholder in queries #2157

Merged
merged 3 commits into from
Mar 30, 2021

Commits on Mar 25, 2021

  1. Avoid extra BindParam allocation to generate placeholder in queries

    Resolves rsim#2152 and
    follow rails/rails#41577.
    
    The tests that fail below have not yet been resolved.
    rails/rails@6ee96a8.
    koic committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    4f03593 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2021

  1. Fix build error

    koic committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    61dae2c View commit details
    Browse the repository at this point in the history
  2. Suppress RuboCop's offense

    This PR commit suppresses and auto-corrects the following RuboCop's offense.
    
    ```console
    % bundle exec rubocop -a
    Inspecting 70 files
    ...................W..................................................
    
    Offenses:
    
    lib/active_record/connection_adapters/oracle_enhanced/quoting.rb:13:52:
    C: [Corrected] Style/RedundantBegin: Redundant begin block detected.
              self.class.quoted_column_names[name] ||= begin
                                                       ^^^^^
    lib/active_record/connection_adapters/oracle_enhanced/quoting.rb:14:11:
    C: [Corrected] Layout/IndentationWidth: Use 2 (not 4) spaces for indentation.
                  "\"#{name.upcase}\""
              ^^^^
    lib/active_record/connection_adapters/oracle_enhanced/quoting.rb:15:13:
    C: [Corrected] Layout/ElseAlignment: Align else with self.class.quoted_column_names[name].
                else
                ^^^^
    lib/active_record/connection_adapters/oracle_enhanced/quoting.rb:16:15:
    C: [Corrected] Layout/CommentIndentation: Incorrect indentation
    detected (column 14 instead of 12).
                  # remove double quotes which cannot be used inside quoted identifier
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    lib/active_record/connection_adapters/oracle_enhanced/quoting.rb:17:11:
    C: [Corrected] Layout/IndentationWidth: Use 2 (not 4) spaces for indentation.
                  "\"#{name.gsub('"', '')}\""
              ^^^^
    lib/active_record/connection_adapters/oracle_enhanced/quoting.rb:18:13:
    W: [Corrected] Layout/EndAlignment: end at 18, 12 is not aligned with
    self.class.quoted_column_names[name] ||= if at 13, 10.
                end
                ^^^
    lib/active_record/connection_adapters/oracle_enhanced/quoting.rb:19:1:
    C: [Corrected] Layout/EmptyLinesAroundMethodBody: Extra empty line
    detected at method body end.
    lib/active_record/connection_adapters/oracle_enhanced/quoting.rb:19:1:
    C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
    
    70 files inspected, 8 offenses detected, 8 offenses corrected
    ```
    koic committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    d105887 View commit details
    Browse the repository at this point in the history