Because DbMap.WithContext returns a SqlExecutor (not a DbMap), it is impossible to set the context on a DbMap without transforming it into a SqlExecutor. This becomes problematic when you want to do something like DbMap.Begin, which is only defined on DbMap and not SqlExecutor.
in practice, this means that DbMap.Begin cannot use an existing context, which means it cannot respect deadlines, which is a real bummer when your connection pool is exhausted 😞
at first glance it seems that WithContext oughta return a DbMap; am I misreading something?
Because
DbMap.WithContextreturns aSqlExecutor(not aDbMap), it is impossible to set the context on aDbMapwithout transforming it into aSqlExecutor. This becomes problematic when you want to do something likeDbMap.Begin, which is only defined onDbMapand notSqlExecutor.in practice, this means that
DbMap.Begincannot use an existing context, which means it cannot respect deadlines, which is a real bummer when your connection pool is exhausted 😞at first glance it seems that
WithContextoughta return aDbMap; am I misreading something?