Module: Sequel::UnthreadedServerBlock
- Defined in:
- lib/sequel/extensions/server_block.rb
Overview
Adds with_server support for the sharded single connection pool.
Instance Method Summary collapse
-
#with_server(server) ⇒ Object
Set a default server/shard to use inside the block.
Instance Method Details
#with_server(server) ⇒ Object
Set a default server/shard to use inside the block.
71 72 73 74 75 76 77 78 |
# File 'lib/sequel/extensions/server_block.rb', line 71 def with_server(server) begin set_default_server(server) yield ensure clear_default_server end end |