GetRootPage returns the root-page (according to the most recent transaction).
(path string)
| 114 | |
| 115 | // GetRootPage returns the root-page (according to the most recent transaction). |
| 116 | func GetRootPage(path string) (root common.Pgid, activeMeta common.Pgid, err error) { |
| 117 | m, id, err := GetActiveMetaPage(path) |
| 118 | if err != nil { |
| 119 | return 0, id, err |
| 120 | } |
| 121 | return m.RootBucket().RootPage(), id, nil |
| 122 | } |
| 123 | |
| 124 | // GetActiveMetaPage returns the active meta page and its page ID (0 or 1). |
| 125 | func GetActiveMetaPage(path string) (*common.Meta, common.Pgid, error) { |