123456789_123456789_123456789_123456789_123456789_

Class: ActiveRecord::ConnectionAdapters::SQLite3::ExplainPrettyPrinter

Do not use. This class is for internal use only.

Instance Method Summary

  • #pp(result)

    Pretty prints the result of an EXPLAIN QUERY PLAN in a way that resembles the output of the SQLite shell:

Instance Method Details

#pp(result)

Pretty prints the result of an EXPLAIN QUERY PLAN in a way that resembles the output of the SQLite shell:

0|0|0|SEARCH TABLE users USING INTEGER PRIMARY KEY (rowid=?) (~1 rows)
0|1|1|SCAN TABLE posts (~100000 rows)
[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb', line 13

def pp(result)
  result.rows.map do |row|
    row.join("|")
  end.join("\n") + "\n"
end