class Flounder::Engine

Intermediary class that arel wants us to create. Mostly supports the connection_pool message returning our connection pool.

Attributes

connection[R]
connection_pool[R]

Public Class Methods

new(connection_pool) click to toggle source
# File lib/flounder/engine.rb, line 10
def initialize connection_pool
  @connection_pool = connection_pool
  # TBD This connection is currently never returned to the pool, Arel
  # is designed that way.
  @connection = connection_pool.checkout
end

Public Instance Methods

exec(*args, &block) click to toggle source
# File lib/flounder/engine.rb, line 17
def exec *args, &block
  connection_pool.with_connection do |conn|
    conn.exec *args, &block
  end
end