feat(go): clarify bind behavior#4267
Merged
lidavidm merged 2 commits intoapache:mainfrom Apr 27, 2026
Merged
Conversation
zeroshade
reviewed
Apr 24, 2026
Comment on lines
+743
to
+744
| // driver will take ownership of (Retain) the given batch; the | ||
| // application may Release the batch after binding. The driver will |
Member
There was a problem hiding this comment.
because the driver calls Retain it is the application's responsibility that they have to call Release separately otherwise it'll be leaked (as opposed to "may")
Member
Author
There was a problem hiding this comment.
I'll change it to "must still" (I was thinking of the case that the application wants to keep the batch around for other uses...but even so eventually it must call Release)
Member
Author
There was a problem hiding this comment.
I'll also simplify to "the driver will Retain the batch" since "ownership" isn't quite a thing in Go-speak
Comment on lines
+753
to
+754
| // driver will take ownership of (Retain) the given reader; the | ||
| // application may Release the reader after binding. The driver will |
Member
There was a problem hiding this comment.
same as above, the application must call Release
I noticed the drivers were inconsistent. This tries to be more explicit about what you are expected to do (bind, then release) and matches the behavior of the Snowflake driver.
b15b157 to
f241fa9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I noticed the drivers were inconsistent. This tries to be more explicit about what you are expected to do (bind, then release) and matches the behavior of the Snowflake driver.