Skip to content

Commit 26d9086

Browse files
author
Jamil Maqdis Anton
committed
Add support for raw config string for Npgsql connection
1 parent 293524e commit 26d9086

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Postgres.fs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ module Postgres =
2424
config.database
2525

2626
let private poolingSettings (pooling: PoolingConfig): string =
27-
let minSize = pooling.minPoolSize |> Option.defaultValue 0
27+
let minSize =
28+
pooling.minPoolSize |> Option.defaultValue 0
2829

2930
let maxSize =
3031
pooling.maxPoolSize |> Option.defaultValue 100
@@ -54,5 +55,8 @@ module Postgres =
5455
new SqlStreamStore.PostgresStreamStore(SqlStreamStore.PostgresStreamStoreSettings
5556
(storeSettingsWithPooling config pooling))
5657

58+
let createStoreWithConfigString (config: string): SqlStreamStore.PostgresStreamStore =
59+
new SqlStreamStore.PostgresStreamStore(SqlStreamStore.PostgresStreamStoreSettings(config))
60+
5761
let createSchema (store: SqlStreamStore.PostgresStreamStore): Async<unit> =
5862
store.CreateSchemaIfNotExists() |> Async.AwaitTask

0 commit comments

Comments
 (0)