# File lib/arjdbc/postgresql/explain_support.rb, line 8 def explain(arel, binds = []) sql = "EXPLAIN #{to_sql(arel, binds)}" raw_result = execute(sql, "EXPLAIN", binds) # TODO we should refactor to exce_query once it returns Result ASAP : keys = raw_result[0] ? raw_result[0].keys : {} rows = raw_result.map { |hash| hash.values } ExplainPrettyPrinter.new.pp ActiveRecord::Result.new(keys, rows) end
Generated with the Darkfish Rdoc Generator 2.