Skip to content

Commit

Permalink
feat(tc): add more support weird isolation level types
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerry Perret committed Jan 23, 2021
1 parent 38a01c8 commit 9e7fe2a
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Vp.FSharp.Sql/Transaction.fs
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,22 @@ let commitOnOk cancellationToken isolationLevel
DbConnection.closedIfClosed wasClosed connection
}

let defaultCommit connection body =
let defaultCommit connection
(beginTransaction: #DbConnection -> 'IsolationLevel -> CancellationToken -> ValueTask<#DbTransaction>)
body =
commit CancellationToken.None DefaultIsolationLevel connection body

let defaultNotCommit connection body =
let defaultNotCommit connection
(beginTransaction: #DbConnection -> 'IsolationLevel -> CancellationToken -> ValueTask<#DbTransaction>)
body =
notCommit CancellationToken.None DefaultIsolationLevel connection body

let defaultCommitOnSome connection body =
let defaultCommitOnSome connection
(beginTransaction: #DbConnection -> 'IsolationLevel -> CancellationToken -> ValueTask<#DbTransaction>)
body =
commitOnSome CancellationToken.None DefaultIsolationLevel connection body

let defaultCommitOnOk connection body =
let defaultCommitOnOk connection
(beginTransaction: #DbConnection -> 'IsolationLevel -> CancellationToken -> ValueTask<#DbTransaction>)
body =
commitOnOk CancellationToken.None DefaultIsolationLevel connection body

0 comments on commit 9e7fe2a

Please sign in to comment.