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

Function setSchema

query/vector/vector_test.go:37–47  ·  view source on GitHub ↗
(schema string)

Source from the content-addressed store, hash-verified

35var dc dgraphapi.Cluster
36
37func setSchema(schema string) {
38 var err error
39 for retry := 0; retry < 60; retry++ {
40 err = client.Alter(context.Background(), &api.Operation{Schema: schema})
41 if err == nil {
42 return
43 }
44 time.Sleep(time.Second)
45 }
46 panic(fmt.Sprintf("Could not alter schema. Got error %v", err.Error()))
47}
48
49func dropPredicate(pred string) {
50 err := client.Alter(context.Background(), &api.Operation{

Calls 2

AlterMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected