Skip to content

Conversation

@everfid-ever
Copy link
Contributor

Which issue(s) this PR fixes:

Fixes #946

@slievrly slievrly requested a review from Copilot November 4, 2025 15:27
Copy link
Contributor

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 adds comprehensive test coverage for the SQL utility package, introducing test files for core functionality including row scanning, parameter conversion, lock key generation, context-aware operations, and type conversion utilities.

Key changes:

  • Added extensive test coverage for ScanRows operations including iteration, scanning, context cancellation, and result set handling
  • Implemented tests for parameter conversion between NamedValue and Value types
  • Created tests for lock key generation with various primary key configurations
  • Added tests for context-aware database operations (prepare, exec, query)
  • Expanded test coverage for type conversion and database version parsing

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/datasource/sql/util/sql_test.go Tests for ScanRows including Next, Scan, Close, context handling, and result sets
pkg/datasource/sql/util/params_test.go Tests for NamedValue/Value conversion utilities
pkg/datasource/sql/util/lockkey_test.go Tests for BuildLockKey with single/composite keys and edge cases
pkg/datasource/sql/util/ctxutil_test.go Tests for context-aware driver operations (prepare, exec, query)
pkg/datasource/sql/util/convert_test.go Expanded tests for type conversion and database version parsing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@slievrly slievrly added this to the 2.1.0 milestone Nov 5, 2025
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.56%. Comparing base (0747d09) to head (73887e8).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #974      +/-   ##
==========================================
+ Coverage   48.49%   51.56%   +3.06%     
==========================================
  Files         199      199              
  Lines       12329    12329              
==========================================
+ Hits         5979     6357     +378     
+ Misses       5880     5482     -398     
- Partials      470      490      +20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve test coverage for pkg/datasource/sql/util

4 participants