• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stephenafamo / scan / 29675347711
91%
main: 91%

Build:
Build:
LAST BUILD BRANCH: refs/tags/v0.9.0
DEFAULT BRANCH: main
Ran 19 Jul 2026 05:46AM UTC
Jobs 1
Files 10
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Jul 2026 05:42AM UTC coverage: 90.82% (+1.2%) from 89.596%
29675347711

Pull #13

github

sandonemaki
feat: add WithRowSkip to skip decoding already-known rows

Preload-style queries deliver the same related row once per parent row.
A caller that shares one instance per distinct key (bob's Preload does
this since stephenafamo/bob#736) still pays to decode every duplicate:
destinations are created, scanned into and read back, then thrown away.

Add an opt-in WithRowSkip(keyColumns, seen) mapping option. Columns are
scanned in result-set order, so once the key columns are decoded, the
first remaining column asks seen whether the row is already known; if it
is, the remaining destinations are neither created nor scanned, the
validator is not consulted, and the built value carries only the key
columns — the caller promised to substitute its own copy.

Skipping degrades to normal scanning whenever it cannot apply: it needs
a TypeConverter whose destinations implement sql.Scanner (delegation),
an unresolvable key column disables it, and columns positioned before
the last key column are always decoded. Rows that are not skipped are
scanned exactly as before, so results never change.

1,000 rows x 45 string columns with 50 distinct keys (fan-in 20),
pass-through converter:

    allocs/op   92,034  ->  8,452   (-90.8%)
    B/op        5.67MB  ->  4.00MB  (-29.4%)
    sec/op      faster in every paired run (-17% .. -69%, noisy laptop)
Pull Request #13: feat: add `WithRowSkip` to skip decoding already-known rows

213 of 221 new or added lines in 3 files covered. (96.38%)

742 of 817 relevant lines covered (90.82%)

43.52 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
89.71
0.94% mapper_struct.go
Jobs
ID Job ID Ran Files Coverage
1 29675347711.1 19 Jul 2026 05:46AM UTC 10
90.82
GitHub Action Run
Source Files on build 29675347711
  • Tree
  • List 10
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #13
  • PR Base - main (#29637173881)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc