Skip to content

Refactor itests#34

Merged
n-r-w merged 4 commits intomasterfrom
refactor-itests
Jan 16, 2026
Merged

Refactor itests#34
n-r-w merged 4 commits intomasterfrom
refactor-itests

Conversation

@n-r-w
Copy link
Owner

@n-r-w n-r-w commented Jan 16, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 16, 2026 14:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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() with pgxscan.Select() for multi-row queries
  • Replaced QueryRow().Scan() with pgxscan.Get() for single-value and single-row queries
  • Added struct definitions with db tags 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.

@n-r-w n-r-w merged commit 80607f4 into master Jan 16, 2026
4 checks passed
@n-r-w n-r-w deleted the refactor-itests branch January 16, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants