Skip to content

feat: add IterateColumns method for improved performance#2196

Open
DengY11 wants to merge 3 commits into
qax-os:masterfrom
DengY11:feature/iterate-columns-clean
Open

feat: add IterateColumns method for improved performance#2196
DengY11 wants to merge 3 commits into
qax-os:masterfrom
DengY11:feature/iterate-columns-clean

Conversation

@DengY11

@DengY11 DengY11 commented Aug 7, 2025

Copy link
Copy Markdown
Contributor

PR Details

Add rows.IterateColumns(iterateFunc), iterate it with a callback function instead create a huge []string.And that will enhance memory performance

Related Issue

close #2191

Example:

err := rows.IterateColumns(func(index int, cell string) error {
    fmt.Printf("column %d: %s\n", index, cell)
    return nil
})

How Has This Been Tested

go test

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • [] My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov

codecov Bot commented Aug 7, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 53.12500% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.14%. Comparing base (5d2ee53) to head (afebad2).
⚠️ Report is 91 commits behind head on master.

Files with missing lines Patch % Lines
rows.go 53.12% 22 Missing and 8 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2196      +/-   ##
==========================================
- Coverage   99.24%   99.14%   -0.10%     
==========================================
  Files          32       32              
  Lines       30562    30626      +64     
==========================================
+ Hits        30331    30365      +34     
- Misses        153      175      +22     
- Partials       78       86       +8     
Flag Coverage Δ
unittests 99.14% <53.12%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@xuri xuri added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 7, 2025
@ankisme

ankisme commented Oct 8, 2025

Copy link
Copy Markdown

Is this pr still adding? Wish to add the feature

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

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support Rows.IterateColumns

3 participants