Method: Sequel::SingleConnectionPool#hold
- Defined in:
- lib/sequel/connection_pool/single.rb
#hold(server = nil) ⇒ Object
Yield the connection to the block.
20 21 22 23 24 25 26 27 |
# File 'lib/sequel/connection_pool/single.rb', line 20 def hold(server=nil) begin yield(@conn ||= make_new(DEFAULT_SERVER)) rescue Sequel::DatabaseDisconnectError, *@error_classes => e disconnect if disconnect_error?(e) raise end end |