method

sql_color

Importance_0
v6.1.7.7 - Show latest stable - 0 notes - Class: ActiveRecord::LogSubscriber
sql_color(sql) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/log_subscriber.rb, line 90
      def sql_color(sql)
        case sql
        when /\A\s*rollback/i
          RED
        when /select .*for update/i, /\A\s*lock/i
          WHITE
        when /\A\s*select/
          BLUE
        when /\A\s*insert/
          GREEN
        when /\A\s*update/
          YELLOW
        when /\A\s*delete/
          RED
        when /transaction\s*\Z/
          CYAN
        else
          MAGENTA
        end
      end
Register or log in to add new notes.