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

Method CreateValueEdge

dql/mutation.go:134–142  ·  view source on GitHub ↗

CreateValueEdge returns a DirectedEdge with the given subject. The predicate, language, and facet values are derived from the NQuad.

(subjectUid uint64)

Source from the content-addressed store, hash-verified

132// CreateValueEdge returns a DirectedEdge with the given subject. The predicate,
133// language, and facet values are derived from the NQuad.
134func (nq NQuad) CreateValueEdge(subjectUid uint64) (*pb.DirectedEdge, error) {
135 var err error
136
137 out := nq.createEdgePrototype(subjectUid)
138 if err = copyValue(out, nq); err != nil {
139 return &emptyEdge, err
140 }
141 return out, nil
142}
143
144// ToDeletePredEdge takes an NQuad of the form '* p *' and returns the equivalent
145// directed edge. Returns an error if the NQuad does not have the expected form.

Callers 2

ToEdgeUsingMethod · 0.95
processNQuadMethod · 0.80

Calls 2

createEdgePrototypeMethod · 0.95
copyValueFunction · 0.85

Tested by

no test coverage detected