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
90 def with_server(default_server, read_only_server=default_server)
91   set_default_server(default_server, read_only_server)
92   yield
93 ensure
94   clear_default_server
95 end