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(default_server, read_only_server = default_server) ⇒ Object
Set a default server/shard to use inside the block.
Instance Method Details
#with_server(default_server, read_only_server = default_server) ⇒ Object
Set a default server/shard to use inside the block.
91 92 93 94 95 96 |
# File 'lib/sequel/extensions/server_block.rb', line 91 def with_server(default_server, read_only_server=default_server) set_default_server(default_server, read_only_server) yield ensure clear_default_server end |