Skip to content

Commit

Permalink
feat(conf): more
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerry Perret authored and natalie-o-perret committed Jan 7, 2021
1 parent 34ba557 commit 488989b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Vp.FSharp.Sql/Types.fs
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ module SqlConf =
[<AbstractClass; Sealed>]
type SqlGlobalConf<'DbConnection, 'DbCommand
when 'DbConnection :> DbConnection
and 'DbCommand :> DbCommand> =
and 'DbCommand :> DbCommand> private() =

static member private innerInstance: SqlConf<'DbConnection, 'DbCommand> = SqlConf.defaultValue()
static member Instance with get () = SqlGlobalConf<'DbConnection, 'DbCommand>.innerInstance
static let mutable instance: SqlConf<'DbConnection, 'DbCommand> = SqlConf.defaultValue()
static member Snapshot with get () = instance

static member logger(value) = SqlConf.logger value SqlGlobalConf<'DbConnection, 'DbCommand>.innerInstance
static member noLogger() = SqlConf.noLogger SqlGlobalConf<'DbConnection, 'DbCommand>.innerInstance
static member Logger(value) = instance <- SqlConf.logger value instance
static member NoLogger() = instance <- SqlConf.noLogger instance

type SqlDeps<'DbConnection, 'DbTransaction, 'DbCommand, 'DbParameter, 'DbDataReader, 'DbType
when 'DbConnection :> DbConnection
Expand Down

0 comments on commit 488989b

Please sign in to comment.