MCPcopy Create free account
hub / github.com/dgraph-io/dgraph-benchmarks / getEntity

Method getEntity

neo/loader.go:119–133  ·  view source on GitHub ↗
(db *neoism.Database, xid string)

Source from the content-addressed store, hash-verified

117}
118
119func (s *state) getEntity(db *neoism.Database, xid string) *neoism.Node {
120 p := neoism.Props{"_xid_": xid}
121 e, created, err := db.GetOrCreateNode("Entity", "_xid_", p)
122 if err != nil {
123 glog.Fatal(err)
124 }
125 if created {
126 e.AddLabel("Entity")
127 glog.WithFields(logrus.Fields{
128 "id": e.Id(),
129 "_xid_": xid,
130 }).Debug("Added new entity")
131 }
132 return e
133}
134
135func (s *state) handleNQuads(db *neoism.Database, wg *sync.WaitGroup) {
136 for nq := range s.cnq {

Callers 1

handleNQuadsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected