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

Method prevSibling

node.go:105–114  ·  view source on GitHub ↗

prevSibling returns the previous node with the same parent.

()

Source from the content-addressed store, hash-verified

103
104// prevSibling returns the previous node with the same parent.
105func (n *node) prevSibling() *node {
106 if n.parent == nil {
107 return nil
108 }
109 index := n.parent.childIndex(n)
110 if index == 0 {
111 return nil
112 }
113 return n.parent.childAt(index - 1)
114}
115
116// put inserts a key/value.
117func (n *node) put(oldKey, newKey, value []byte, pgId common.Pgid, flags uint32) {

Callers 1

rebalanceMethod · 0.95

Calls 2

childIndexMethod · 0.80
childAtMethod · 0.80

Tested by

no test coverage detected