Sha256: 53d3dbd4bca0628468ddc509f3bd1ece68cf2c97b7069ef2fb7b9c388ef36daf

Contents?: true

Size: 545 Bytes

Versions: 33

Compression:

Stored size: 545 Bytes

Contents

module ActiveRecord
  module ConnectionAdapters
    module SQLite3
      class ExplainPrettyPrinter # :nodoc:
        # 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)
        #
        def pp(result)
          result.rows.map do |row|
            row.join('|')
          end.join("\n") + "\n"
        end
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 4 rubygems

Version Path
activerecord-5.0.7.2 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-5.0.7.1 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-5.0.7 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-5.0.6 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-5.0.6.rc1 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-5.0.5 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-5.0.5.rc2 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-5.0.5.rc1 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-5.0.4 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-5.0.4.rc1 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-5.0.3 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/activerecord-5.0.2/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-5.0.2 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-5.0.2.rc1 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
autocompl-0.2.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
autocompl-0.2.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
autocompl-0.2.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb