mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
Add failing spec for explicitly created statements
This commit is contained in:
parent
ba2dcd4fe8
commit
ae728b1695
1 changed files with 14 additions and 0 deletions
|
@ -72,6 +72,20 @@ describe DB::Statement do
|
|||
rs.statement.closed?.should be_true
|
||||
end
|
||||
end
|
||||
|
||||
it "should not close statements if false and created explicitly" do
|
||||
with_dummy_connection("prepared_statements=true&prepared_statements_cache=false") do |cnn|
|
||||
stmt = cnn.prepared("the query")
|
||||
|
||||
rs = stmt.query
|
||||
# do not close while iterating
|
||||
stmt.closed?.should be_false
|
||||
rs.close
|
||||
|
||||
# do not close after iterating
|
||||
stmt.closed?.should be_false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
it "should initialize positional params in query" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue