module Sequel::ThreadedServerBlock

  1. lib/sequel/extensions/server_block.rb

Adds with_server support for the sharded threaded connection pool.

Methods

Public Instance

  1. with_server

Public Instance methods

with_server(default_server, read_only_server=default_server)

Set a default server/shard to use inside the block for the current thread.

[show source]
    # File lib/sequel/extensions/server_block.rb
131 def with_server(default_server, read_only_server=default_server)
132   set_default_server(default_server, read_only_server)
133   yield
134 ensure
135   clear_default_server
136 end