Method: Ensql::SequelAdapter.pool
- Defined in:
- lib/ensql/sequel_adapter.rb
.pool(db) ⇒ PoolWrapper
Wrap the raw connections from a Sequel::Database connection pool. This allows us to safely checkout the underlying database connection for use in a database specific adapter.
Ensql.adapter = MySqliteAdapter.new(SequelAdapter.pool)
58 59 60 61 62 |
# File 'lib/ensql/sequel_adapter.rb', line 58 def self.pool(db) PoolWrapper.new do |client_block| db.pool.hold(&client_block) end end |