Skip to content

Commit 33f766d

Browse files
author
Jamil Maqdis Anton
committed
Add createSchemaRaw and change createSchema's type AsyncResult
1 parent 1c221a5 commit 33f766d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Postgres.fs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
namespace SqlStreamStore.FSharp.Postgres
22

3+
open SqlStreamStore.FSharp
4+
35
type PostgresConfig =
46
{ host: string
57
port: string
@@ -58,5 +60,10 @@ module Postgres =
5860
let createStoreWithConfigString (config: string): SqlStreamStore.PostgresStreamStore =
5961
new SqlStreamStore.PostgresStreamStore(SqlStreamStore.PostgresStreamStoreSettings(config))
6062

61-
let createSchema (store: SqlStreamStore.PostgresStreamStore): Async<unit> =
63+
let createSchemaRaw (store: SqlStreamStore.PostgresStreamStore): Async<unit> =
6264
store.CreateSchemaIfNotExists() |> Async.AwaitTask
65+
66+
let createSchema (store: SqlStreamStore.PostgresStreamStore): Async<Result<unit, string>> =
67+
store.CreateSchemaIfNotExists()
68+
|> Async.AwaitTask
69+
|> ExceptionsHandler.simpleExceptionHandler

0 commit comments

Comments
 (0)