Skip to content

Support for ignoring statements from StmtContext #9

Description

@camhashemi

from the godocs for Tx.StmtContext:

The returned statement operates within the transaction and will be closed when the transaction has been committed or rolled back.

This makes it syntactically nicer to not defer stmt.Close() when using StmtContext

Is it possible to ignore errors for these statements?

Activity

  1. ryanrolds commented on Oct 25, 2020

    @ryanrolds
    Owner

    Should be possible. I will look into it and see what I can do.

  2. matthewcummings commented on Nov 15, 2020

    @matthewcummings

    Similarly, would it be possible to ignore errors inside loops? Or can you provide an example showing how to use sqlclosecheck inside a loop?

  3. ryanrolds commented on Aug 20, 2023

    @ryanrolds
    Owner

    Sorry for not following up. Over the next few weeks I will be giving this project more attention. This looks to be similar to #14. I'm counting them as two requests for not flagging unclosed transactions.

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

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions