Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the integration tests to use the scany library for row scanning instead of manual row iteration and scanning. The change simplifies test code by replacing verbose pgx row handling with struct-based scanning using pgxscan.Select() and pgxscan.Get().
Changes:
- Replaced manual row iteration and
rows.Scan()withpgxscan.Select()for multi-row queries - Replaced
QueryRow().Scan()withpgxscan.Get()for single-value and single-row queries - Added struct definitions with
dbtags to support struct-based scanning - Updated documentation to reference integration tests as examples of using scany
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| itests/write_test.go | Refactored to use pgxscan for INSERT, UPDATE, and DELETE queries with RETURNING clauses |
| itests/select_test.go | Refactored to use pgxscan for complex SELECT queries with struct-based result mapping |
| itests/db_test.go | Refactored helper functions to use pgxscan for scanning query results |
| go.mod | Added scany/v2 v2.1.4 dependency |
| go.sum | Added checksums for scany and its transitive dependencies |
| README.md | Added reference to integration tests as examples for using scany |
| AGENTS.md | Documented scany as part of the tech stack |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.