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

Function AddNumberOfTriples

testutil/multi_tenancy.go:405–415  ·  view source on GitHub ↗
(t *testing.T, dg *dgo.Dgraph, start, end int)

Source from the content-addressed store, hash-verified

403}
404
405func AddNumberOfTriples(t *testing.T, dg *dgo.Dgraph, start, end int) (*api.Response, error) {
406 triples := strings.Builder{}
407 for i := start; i <= end; i++ {
408 triples.WriteString(fmt.Sprintf("_:person%[1]v <name> \"person%[1]v\" .\n", i))
409 }
410 resp, err := dg.NewTxn().Mutate(context.Background(), &api.Mutation{
411 SetNquads: []byte(triples.String()),
412 CommitNow: true,
413 })
414 return resp, err
415}

Callers

nothing calls this directly

Calls 2

MutateMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected