Skip to content

context cannot be passed to DbMap.Begin #437

Description

@MisterSquishy

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions