MCPcopy
hub / github.com/dgraph-io/dgraph / buildPredsForDefaultNamespace

Function buildPredsForDefaultNamespace

worker/online_restore.go:616–627  ·  view source on GitHub ↗
(restorePreds []string, fromNamespace uint64)

Source from the content-addressed store, hash-verified

614}
615
616func buildPredsForDefaultNamespace(restorePreds []string, fromNamespace uint64) []string {
617 filtered := restorePreds[:0]
618 for _, pred := range restorePreds {
619 ns, attr := x.ParseNamespaceAttr(pred)
620 if fromNamespace == ns {
621 // update namespace value to 0
622 pred = x.NamespaceAttr(0, attr)
623 filtered = append(filtered, pred)
624 }
625 }
626 return filtered
627}

Callers 1

handleRestoreProposalFunction · 0.85

Calls 2

ParseNamespaceAttrFunction · 0.92
NamespaceAttrFunction · 0.92

Tested by

no test coverage detected