make Database return PoolStatement

create StatementMethods for common interface between Statement and PoolStatment.
This commit is contained in:
Brian J. Cardiff 2016-08-29 16:56:34 -03:00
parent 6a0a450622
commit 75aa821f5f
6 changed files with 148 additions and 31 deletions

View file

@ -39,4 +39,12 @@ describe DB::Database do
end
end
end
it "should allow creation of more statements than pool connections" do
DB.open "dummy://localhost:1027?initial_pool_size=1&max_pool_size=2" do |db|
db.prepare("query1").should be_a(DB::PoolStatement)
db.prepare("query2").should be_a(DB::PoolStatement)
db.prepare("query3").should be_a(DB::PoolStatement)
end
end
end