Skip to content

Commit 4056dc9

Browse files
authored
[F#/Oxpecker] Returned back command auto-prepare (#9454)
1 parent 6bc92fd commit 4056dc9

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

frameworks/FSharp/oxpecker/src/App/Common.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ module Common =
2626
}
2727

2828
[<Literal>]
29-
let ConnectionString = "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=1024;NoResetOnClose=true;Enlist=false"
29+
let ConnectionString = "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=1024;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4"
3030
[<Literal>]
31-
let MultiplexedConnectionString = ConnectionString + ";Max Auto Prepare=3;Multiplexing=true"
31+
let MultiplexedConnectionString = ConnectionString + ";Multiplexing=true"
3232

3333
let FortuneComparer = {
3434
new IComparer<Fortune> with

frameworks/FSharp/oxpecker/src/App/Db.fs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ module Db =
1414
use db = new NpgsqlConnection(ConnectionString)
1515
use cmd = db.CreateCommand(CommandText = "SELECT id, message FROM fortune")
1616
do! db.OpenAsync()
17-
do! cmd.PrepareAsync()
1817
use! rdr = cmd.ExecuteReaderAsync(CommandBehavior.CloseConnection)
1918
while! rdr.ReadAsync() do
2019
result.Add { id = rdr.GetInt32(0); message = rdr.GetString(1) }
@@ -46,7 +45,6 @@ module Db =
4645
let struct(cmd', _) = createReadCommand db
4746
use cmd = cmd'
4847
do! db.OpenAsync()
49-
do! cmd.PrepareAsync()
5048
return! readSingleRow cmd
5149
}
5250

0 commit comments

Comments
 (0)