Skip to content

Conversation

robertoamici
Copy link

Hi there,

i havent seen any PR requirements or existing tests on the repo so this is just the bare bone change.

Basically I am conditionally making the DBTX interface in the golang sql.DB implementation a little smaller by removing the PrepareContext when prepared queries are turned off, since all usages of PrepareContext are in the part of the template behind the same if statement. In general, if a method is not used, why add it to the interface?

For some context, we ran across this because we are trying to pass to sqlc a wrapper of sql.DB (from https://pkg.go.dev/github.com/honeycombio/beeline-go/wrappers/hnysql) which has a slightly different PrepareContext return type. We don't use prepared queries so that difference shouldn't impact us.

Copy link
Collaborator

@kyleconroy kyleconroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The expected test output needs to be updated using make regenerate.

@kyleconroy kyleconroy closed this Mar 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants