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

Function IsRootNsOperation

x/x.go:278–285  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

276}
277
278func IsRootNsOperation(ctx context.Context) bool {
279 md, ok := metadata.FromIncomingContext(ctx)
280 if !ok {
281 return false
282 }
283 ns := md.Get("galaxy-operation")
284 return len(ns) > 0 && (ns[0] == "true" || ns[0] == "True")
285}
286
287func GetForceNamespace(ctx context.Context) string {
288 md, ok := metadata.FromIncomingContext(ctx)

Callers 5

doQueryMethod · 0.92
addQueryIfUniqueFunction · 0.92
ProcessMethod · 0.92
ExpandEdgesFunction · 0.92

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected