veepee-oss / Vp.FSharp.Sql

Generic F# ADO Provider Wrapper
https://github.com/veepee-oss/Vp.FSharp.Sql
ISC License
35 stars 3 forks source link

Add logging support #4

Closed natalie-o-perret closed 3 years ago

natalie-o-perret commented 3 years ago

The gist in F#:

type SqlLog<'DbConnection, 'DbCommand
    when 'DbConnection :> DbConnection
    and 'DbCommand :> DbCommand> =
    | ConnectionOpened of connection: 'DbConnection
    | ConnectionClosed of connection: 'DbConnection * sinceOpened: TimeSpan
    | CommandPrepared of command: 'DbCommand
    | CommandExecuted of command: 'DbCommand * sincePrepared: TimeSpan
natalie-o-perret commented 3 years ago

Add support for logging callbacks in the impl. below:

No need for these below, cause: