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
|
end
|
||||||
|
|
||||||
def to_sql
|
def to_sql
|
||||||
visitor.accept @head
|
@visitor.accept @head
|
||||||
end
|
end
|
||||||
|
|
||||||
def initialize_copy other
|
def initialize_copy other
|
||||||
|
|
|
@ -9,8 +9,10 @@ module Arel
|
||||||
end
|
end
|
||||||
|
|
||||||
def accept object
|
def accept object
|
||||||
@connection = @engine.connection
|
@engine.connection_pool.with_connection do |conn|
|
||||||
visit object
|
@connection = conn
|
||||||
|
visit object
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in a new issue