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

stephenafamo / scan
91%
main: 91%

Build:
Build:
LAST BUILD BRANCH: refs/tags/v0.9.0
DEFAULT BRANCH: main
Repo Added 26 Dec 2022 07:32PM UTC
Files 10
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

LAST BUILD ON BRANCH scan-rowskip
branch: scan-rowskip
CHANGE BRANCH
x
Reset
  • scan-rowskip
  • fix/close-rows-in-fromrows
  • fix/each-rows-err-check
  • main
  • perf/reuse-row-scan-buffers
  • perf/schedule-scan-by-index
  • refs/tags/v0.1.0
  • refs/tags/v0.1.1
  • refs/tags/v0.2.0
  • refs/tags/v0.3.0
  • refs/tags/v0.4.0
  • refs/tags/v0.4.1
  • refs/tags/v0.4.2
  • refs/tags/v0.5.0
  • refs/tags/v0.6.0
  • refs/tags/v0.6.1
  • refs/tags/v0.6.2
  • refs/tags/v0.7.0
  • refs/tags/v0.8.0
  • refs/tags/v0.9.0
  • revert-3-named-args-v2
  • scan-plan-once

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

Relevant lines Covered
Build:
Build:
817 RELEVANT LINES 742 COVERED LINES
43.52 HITS PER LINE
Source Files on scan-rowskip
  • Tree
  • List 10
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
29675347711 scan-rowskip 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 t... Pull #13 19 Jul 2026 05:46AM UTC sandonemaki github
90.82
See All Builds (65)
  • Repo on GitHub
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