in pq/cursor.go [90:113]
func (c *txCursor) Skip(n int) reason {
const op = "pq/skip"
for n > 0 {
if c.PageBytes() == 0 {
ok, err := c.AdvancePage()
if err != nil {
return c.errWrap(op, err).of(SeekFail)
}
if !ok {
return c.err(op).report("No page to seek to")
}
}
max := n
if L := c.PageBytes(); L < max {
max = L
}
c.cursor.off += max
n -= max
}
return nil
}