mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
make Database return PoolStatement
create StatementMethods for common interface between Statement and PoolStatment.
This commit is contained in:
parent
6a0a450622
commit
75aa821f5f
6 changed files with 148 additions and 31 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue