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

Function StripBlankNode

query/query.go:3126–3134  ·  view source on GitHub ↗

StripBlankNode returns a copy of the map where all the keys have the blank node prefix removed.

(mp map[string]uint64)

Source from the content-addressed store, hash-verified

3124
3125// StripBlankNode returns a copy of the map where all the keys have the blank node prefix removed.
3126func StripBlankNode(mp map[string]uint64) map[string]uint64 {
3127 temp := make(map[string]uint64)
3128 for k, v := range mp {
3129 if strings.HasPrefix(k, "_:") {
3130 temp[k[2:]] = v
3131 }
3132 }
3133 return temp
3134}
3135
3136// calculateMetrics populates the given map with the number of UIDs that were seen
3137// for each predicate.

Callers 1

doMutateMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected