MCPcopy
hub / github.com/etcd-io/bbolt / forEachPage

Method forEachPage

tx.go:645–649  ·  view source on GitHub ↗

forEachPage iterates over every page within a given page and executes a function.

(pgidnum common.Pgid, fn func(*common.Page, int, []common.Pgid))

Source from the content-addressed store, hash-verified

643
644// forEachPage iterates over every page within a given page and executes a function.
645func (tx *Tx) forEachPage(pgidnum common.Pgid, fn func(*common.Page, int, []common.Pgid)) {
646 stack := make([]common.Pgid, 10)
647 stack[0] = pgidnum
648 tx.forEachPageInternal(stack[:1], fn)
649}
650
651func (tx *Tx) forEachPageInternal(pgidstack []common.Pgid, fn func(*common.Page, int, []common.Pgid)) {
652 p := tx.page(pgidstack[len(pgidstack)-1])

Callers 1

Calls 1

forEachPageInternalMethod · 0.95

Tested by

no test coverage detected