-
Notifications
You must be signed in to change notification settings - Fork 590
Supports scanning of Array, IPv4, IPv6, and Map types into Go values that implement the sql.Scanner
interface.
#1570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
3d72aa9
Support sql.Scanner for Bool, IPv4 and IPv6 types
zapateo 1eb9678
Support sql.Scanner for Array and Map types
zapateo 00f2dc2
Use sql.Scanner to refer to the sql.Scanner interface
zapateo 0904d4f
Run `go fmt ./...`
zapateo 21ed6f4
Add test `TestSQLScannerArray`
zapateo e8d3a0c
Add test `TestSQLScannerIPv4`
zapateo 9dd2e38
Add comment
zapateo f043fb5
Add a comment
zapateo da1333f
Add test `TestSQLScannerIPv6`
zapateo f96741a
Add test `TestSQLScannerMap`
zapateo 2823415
Remove code that handle bool values, as already implemented in upstream
zapateo 1683742
Use consistent style in type assertions
zapateo c7580c5
Restore import position and grouping
zapateo 31f59cb
Move tests at the end of respective files
zapateo c6ce79e
Remove review comment
zapateo c88fb17
Run 'go fmt ./...'
zapateo 510fda5
Merge remote-tracking branch 'upstream/main'
zapateo 574280c
Use `assert.Equal` instead of `assert.ObjectsAreEqual`
zapateo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] For consistency with other tests, consider replacing require.Nil(t, batch.Send()) with require.NoError(t, batch.Send()).
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test added in this PR follows the structure of a test that was already in the repository (
TestInterfaceArray
), so I would maintain consistency between the two tests. I would suggest making this change separately, if necessary, outside of this PR, in order to update it in the other test and potentially in other areas as well.