forEachPage iterates over every page within a given page and executes a function.
(pgidnum common.Pgid, fn func(*common.Page, int, []common.Pgid))
| 643 | |
| 644 | // forEachPage iterates over every page within a given page and executes a function. |
| 645 | func (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 | |
| 651 | func (tx *Tx) forEachPageInternal(pgidstack []common.Pgid, fn func(*common.Page, int, []common.Pgid)) { |
| 652 | p := tx.page(pgidstack[len(pgidstack)-1]) |
no test coverage detected