mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
make pool_prepared_statements always prepare statement in connection
This commit is contained in:
parent
2cab0b37f5
commit
543592a337
2 changed files with 13 additions and 1 deletions
|
@ -140,6 +140,18 @@ describe DB::Database do
|
|||
db.build("the query").should be_a(DB::PoolUnpreparedStatement)
|
||||
end
|
||||
end
|
||||
|
||||
it "should be overrided by dsl" do
|
||||
with_dummy "dummy://localhost:1027?prepared_statements=true" do |db|
|
||||
stmt = db.unprepared.query("the query").statement.as(DummyDriver::DummyStatement)
|
||||
stmt.prepared?.should be_false
|
||||
end
|
||||
|
||||
with_dummy "dummy://localhost:1027?prepared_statements=false" do |db|
|
||||
stmt = db.prepared.query("the query").statement.as(DummyDriver::DummyStatement)
|
||||
stmt.prepared?.should be_true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "unprepared statements in pool" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue