Class Index [+]

Quicksearch

Sequel::ServerBlock

Public Class Methods

extended(db) click to toggle source

Enable the server block on the connection pool, choosing the correct extension depending on whether the connection pool is threaded or not. Also defines the with_server method on the receiver for easy use.

    # File lib/sequel/extensions/server_block.rb, line 38
38:     def self.extended(db)
39:       pool = db.pool
40:       if defined?(ShardedThreadedConnectionPool) && pool.is_a?(ShardedThreadedConnectionPool)
41:         pool.extend(ThreadedServerBlock)
42:         pool.instance_variable_set(:@default_servers, {})
43:       else
44:         pool.extend(UnthreadedServerBlock)
45:         pool.instance_variable_set(:@default_servers, [])
46:       end
47:     end

Public Instance Methods

with_server(server, &block) click to toggle source

Delegate to the connection pool

    # File lib/sequel/extensions/server_block.rb, line 50
50:     def with_server(server, &block)
51:       pool.with_server(server, &block)
52:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.