module Sequel::UnthreadedServerBlock

  1. lib/sequel/extensions/server_block.rb

Adds with_server support for the sharded single 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.

[show source]
   # File lib/sequel/extensions/server_block.rb
91 def with_server(default_server, read_only_server=default_server)
92   set_default_server(default_server, read_only_server)
93   yield
94 ensure
95   clear_default_server
96 end