mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
using the connection pool while visiting
This commit is contained in:
parent
03724fb178
commit
7615bd7f92
2 changed files with 5 additions and 3 deletions
|
@ -15,7 +15,7 @@ module Arel
|
|||
end
|
||||
|
||||
def to_sql
|
||||
visitor.accept @head
|
||||
@visitor.accept @head
|
||||
end
|
||||
|
||||
def initialize_copy other
|
||||
|
|
|
@ -9,9 +9,11 @@ module Arel
|
|||
end
|
||||
|
||||
def accept object
|
||||
@connection = @engine.connection
|
||||
@engine.connection_pool.with_connection do |conn|
|
||||
@connection = conn
|
||||
visit object
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def visit_Arel_Nodes_DeleteStatement o
|
||||
|
|
Loading…
Reference in a new issue