Add nulls.ValidInt64Count helper - #1364
Conversation
Frequency-based schedule expansion needs to know how many of a frequency row's optional fields (headway, start/end time, exact_times) are actually populated before treating the row as valid. Extracted from PR OneBusAway#1343 as a standalone, general-purpose helper since it has no dependency on the rest of that PR's schedule-for-stop changes.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe nulls package adds ChangesNullable integer count
Estimated code review effort: 1 (Trivial) | ~3 minutes Merge Risk: ⚪ Minimal · up to This localized helper adds valid-value counting behavior with no actionable merge-blocking risk remaining after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |



Summary
nulls.ValidInt64Count, a small helper that counts how manysql.NullInt64values in a variadic list are valid.Context
Extracted from #1343 ("Add frequency-based schedule-for-stop service"). That PR's
schedule_for_stop_handler.gochanges collide with the in-flight #1348 ("GTFS Frequencies Phase 3"), which is taking over that file. This helper has no dependency on the rest of #1343's changes and is general-purpose (counting valid frequency-row fields to decide whether a row is usable), so it's being carved out on its own rather than getting lost when #1343 closes.Validation
go vet -tags "sqlite_fts5 sqlite_math_functions" ./...go vet -tags "purego" ./...make testgo fmt ./...Summary by CodeRabbit
New Features
Tests