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

Function CopyPage

internal/surgeon/surgeon.go:10–17  ·  view source on GitHub ↗
(path string, srcPage common.Pgid, target common.Pgid)

Source from the content-addressed store, hash-verified

8)
9
10func CopyPage(path string, srcPage common.Pgid, target common.Pgid) error {
11 p1, d1, err1 := guts_cli.ReadPage(path, uint64(srcPage))
12 if err1 != nil {
13 return err1
14 }
15 p1.SetId(target)
16 return guts_cli.WritePage(path, d1)
17}
18
19func ClearPage(path string, pgId common.Pgid) (bool, error) {
20 return ClearPageElements(path, pgId, 0, -1, false)

Callers 4

surgeryCopyPageFuncFunction · 0.92
RevertMetaPageFunction · 0.85

Calls 3

ReadPageFunction · 0.92
WritePageFunction · 0.92
SetIdMethod · 0.80