MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / getParent

Method getParent

db/revtree.go:287–293  ·  view source on GitHub ↗

Returns the parent ID of a revid. The parent is "" if the revid is a root. Panics if the revid is not in the map at all.

(revid string)

Source from the content-addressed store, hash-verified

285// Returns the parent ID of a revid. The parent is "" if the revid is a root.
286// Panics if the revid is not in the map at all.
287func (tree RevTree) getParent(revid string) string {
288 info, err := tree.getInfo(revid)
289 if err != nil {
290 return ""
291 }
292 return info.Parent
293}
294
295// Returns the leaf revision IDs (those that have no children.)
296func (tree RevTree) GetLeaves() []string {

Callers 4

TestRevTreeParentAccessFunction · 0.80
TestRevTreeAddRevisionFunction · 0.80
getAncestorJSONMethod · 0.80
backupAncestorRevsMethod · 0.80

Calls 1

getInfoMethod · 0.95

Tested by 2

TestRevTreeParentAccessFunction · 0.64
TestRevTreeAddRevisionFunction · 0.64