For each database entry I want to create a connection pool. How can I achieve that using this gem? Thanks
class User < ActiveRecord::Base
has_many :databases
end
class Database < ActiveRecord::Base
belongs_to :user
# attributes: host, name, username, password
end
# usage
database = Database.first
database.with do |conn|
conn.exec("select 1")
end
For each database entry I want to create a connection pool. How can I achieve that using this gem? Thanks