Class: NeverBlock::DB::PooledMySQL
- Inherits:
-
Connection
- Object
- Connection
- NeverBlock::DB::PooledMySQL
- Defined in:
- lib/neverblock/io/db/drivers/mysql.rb
Overview
MySQL
Instance Method Summary collapse
-
#initialize(*args) ⇒ PooledMySQL
constructor
A new instance of PooledMySQL.
Methods inherited from Connection
#method_missing, #query, #replace_acquired_connection, #respond_to?
Constructor Details
#initialize(*args) ⇒ PooledMySQL
Returns a new instance of PooledMySQL.
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/neverblock/io/db/drivers/mysql.rb', line 53 def initialize(*args) = {} if args #&& (options = args.last).is_a? Hash size = [:size] || 4 eager = [:eager] || true args.pop end @pool = NB::DB::Pool.new(:size=>size, :eager=>eager) do MySQL.new(*args) end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class NeverBlock::DB::Connection