Skip to content

Commit

Permalink
Merge pull request #1384 from yahonda/explain_binds
Browse files Browse the repository at this point in the history
Address `ORA-00905: missing keyword: EXPLAIN PLAN FOR`
  • Loading branch information
yahonda committed Jul 24, 2017
2 parents d770118 + e7979d6 commit 5d4a39c
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -64,7 +64,8 @@ def supports_explain?
end

def explain(arel, binds = [])
sql = "EXPLAIN PLAN FOR #{to_sql(arel, binds)}"
sql, binds = to_sql(arel, binds)
sql = "EXPLAIN PLAN FOR #{sql}"
return if sql =~ /FROM all_/
if ORACLE_ENHANCED_CONNECTION == :jdbc
exec_query(sql, "EXPLAIN", binds)
Expand Down

0 comments on commit 5d4a39c

Please sign in to comment.