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

Function deleteTriplesInCluster

query/vector/vector_test.go:139–151  ·  view source on GitHub ↗
(triples string)

Source from the content-addressed store, hash-verified

137}
138
139func deleteTriplesInCluster(triples string) {
140 txn := client.NewTxn()
141 ctx := context.Background()
142 defer func() { _ = txn.Discard(ctx) }()
143
144 _, err := txn.Mutate(ctx, &api.Mutation{
145 DelNquads: []byte(triples),
146 CommitNow: true,
147 })
148 if err != nil {
149 panic(fmt.Sprintf("Could not delete triples. Got error %v", err.Error()))
150 }
151}
152func updateVector(t *testing.T, triple string, pred string) []float32 {
153 uid := strings.Split(triple, " ")[0]
154 randomVec := generateRandomVector(10)

Callers 1

TestVectorDeleteFunction · 0.70

Calls 2

MutateMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…