Sha256: 404c2cc897640691acd02be400a515b0a70bde1e765e582ab7d71eae61e542ca

Contents?: true

Size: 576 Bytes

Versions: 187

Compression:

Stored size: 576 Bytes

Contents

# frozen_string_literal: true

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

187 entries across 182 versions & 15 rubygems

Version Path
activerecord-6.0.1 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/activerecord-6.0.0/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-6.0.1.rc1 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/activerecord-6.0.0/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-6.0.0 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
spiral_form-0.1.1 vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
spiral_form-0.1.0 vendor/bundle/gems/activerecord-5.2.3/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-6.0.0.rc2 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-6.0.0.rc1 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-5.2.3 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-5.2.3.rc1 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-6.0.0.beta3 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-5.2.2.1 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-6.0.0.beta2 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-6.0.0.beta1 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
nullifyable-0.1.0 vendor/bundle/gems/activerecord-5.2.2/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-5.2.2 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-5.2.2.rc1 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-5.2.1.1 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb
activerecord-5.2.1 lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb