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

Method isLeaf

db/revtree.go:343–353  ·  view source on GitHub ↗
(revid string)

Source from the content-addressed store, hash-verified

341}
342
343func (tree RevTree) isLeaf(revid string) bool {
344 if !tree.contains(revid) {
345 return false
346 }
347 for _, info := range tree {
348 if info.Parent == revid {
349 return false
350 }
351 }
352 return true
353}
354
355// Finds the "winning" revision, the one that should be treated as the default.
356// This is the leaf revision whose (!deleted, generation, hash) tuple compares the highest.

Callers 4

channelsForRevTreeIDMethod · 0.80
TestRevTreeIsLeafFunction · 0.80
PutMethod · 0.80
CreateDocNoHLVMethod · 0.80

Calls 1

containsMethod · 0.95

Tested by 1

TestRevTreeIsLeafFunction · 0.64