Skip to content

Commit

Permalink
Merge branch 'main' into rails_pr_49378
Browse files Browse the repository at this point in the history
  • Loading branch information
lorint committed Oct 2, 2023
2 parents e2eaa3f + 64552ff commit c694d61
Showing 1 changed file with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,6 @@ def execute(sql, name = nil, **kwargs)
ActiveRecord::Result.new(result.fields, result.to_a)
end

def write_query?(sql) # :nodoc:
!READ_QUERY.match?(sql)
rescue ArgumentError # Invalid encoding
!READ_QUERY.match?(sql.b)
end

def explain(arel, binds = [])
sql = "EXPLAIN #{to_sql(arel, binds)}"
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
result = internal_exec_query(sql, "EXPLAIN", binds)
elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start

MySQL::ExplainPrettyPrinter.new.pp(result, elapsed)
end

def select_all(*, **) # :nodoc:
result = super
with_trilogy_connection do |conn|
Expand Down

0 comments on commit c694d61

Please sign in to comment.