Class Index [+]

Quicksearch

Sequel::ConnectionPool::ClassMethods

Class methods used to return an appropriate pool subclass, separated into a module for easier overridding by extensions.

Public Instance Methods

get_pool(opts = {}, &block) click to toggle source

Return a pool subclass instance based on the given options. If a :pool_class option is provided is provided, use that pool class, otherwise use a new instance of an appropriate pool subclass based on the :single_threaded and :servers options.

    # File lib/sequel/connection_pool.rb, line 42
42:     def get_pool(opts = {}, &block)
43:       case v = connection_pool_class(opts)
44:       when Class
45:         v.new(opts, &block)
46:       when Symbol
47:         Sequel.ts_require("connection_pool/#{v}")
48:         connection_pool_class(opts).new(opts, &block) || raise(Sequel::Error, "No connection pool class found")
49:       end
50:     end

Private Instance Methods

connection_pool_class(opts) click to toggle source

Return a connection pool class based on the given options.

    # File lib/sequel/connection_pool.rb, line 55
55:     def connection_pool_class(opts)
56:       CONNECTION_POOL_MAP[opts[:pool_class]] || opts[:pool_class] || CONNECTION_POOL_MAP[[!!opts[:single_threaded], !!opts[:servers]]]
57:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.