mirror of
https://github.com/hanzo-ds/native.git
synced 2026-10-30 20:00:34 +00:00
Module path, package names, and identifiers de-branded to native/proto/compress/ pool/tracing. Server wire-protocol strings preserved. Vendored codec surface used by hanzo-ds/go (proto + compress).
23 lines
373 B
Go
23 lines
373 B
Go
//go:build go1.23
|
|
|
|
package proto
|
|
|
|
import "iter"
|
|
|
|
// RowRange returns a [iter.Seq] iterator over i-th row.
|
|
func (c ColArr[T]) RowRange(i int) iter.Seq[T] {
|
|
var start int
|
|
end := int(c.Offsets[i])
|
|
if i > 0 {
|
|
start = int(c.Offsets[i-1])
|
|
}
|
|
|
|
return func(yield func(T) bool) {
|
|
for idx := start; idx < end; idx++ {
|
|
if !yield(c.Data.Row(idx)) {
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|