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

Function updateValInMutations

edgraph/server.go:1083–1091  ·  view source on GitHub ↗

updateValInMutations does following transformations: 0x123 val(v) -> 0x123 13.0

(gmu *dql.Mutation, qc *queryContext)

Source from the content-addressed store, hash-verified

1081// updateValInMutations does following transformations:
1082// 0x123 <amount> val(v) -> 0x123 <amount> 13.0
1083func updateValInMutations(gmu *dql.Mutation, qc *queryContext) error {
1084 gmu.Del = updateValInNQuads(gmu.Del, qc, false)
1085 gmu.Set = updateValInNQuads(gmu.Set, qc, true)
1086 if qc.nquadsCount > x.Config.LimitMutationsNquad {
1087 return errors.Errorf("NQuad count in the request: %d, is more that threshold: %d",
1088 qc.nquadsCount, x.Config.LimitMutationsNquad)
1089 }
1090 return nil
1091}
1092
1093// updateUIDInMutations does following transformations:
1094// - uid(v) -> 0x123 -- If v is defined in query block

Callers 1

updateMutationsFunction · 0.85

Calls 2

updateValInNQuadsFunction · 0.85
ErrorfMethod · 0.45

Tested by

no test coverage detected