forEachPage iterates over every page in a bucket, including inline pages.
(fn func(*common.Page, int, []common.Pgid))
| 698 | |
| 699 | // forEachPage iterates over every page in a bucket, including inline pages. |
| 700 | func (b *Bucket) forEachPage(fn func(*common.Page, int, []common.Pgid)) { |
| 701 | // If we have an inline page then just use that. |
| 702 | if b.page != nil { |
| 703 | fn(b.page, 0, []common.Pgid{b.RootPage()}) |
| 704 | return |
| 705 | } |
| 706 | |
| 707 | // Otherwise traverse the page hierarchy. |
| 708 | b.tx.forEachPage(b.RootPage(), fn) |
| 709 | } |
| 710 | |
| 711 | // forEachPageNode iterates over every page (or node) in a bucket. |
| 712 | // This also includes inline pages. |