MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / SetupSchema

Method SetupSchema

dgraphapi/cluster.go:731–735  ·  view source on GitHub ↗

SetupSchema sets up DQL schema

(dbSchema string)

Source from the content-addressed store, hash-verified

729
730// SetupSchema sets up DQL schema
731func (gc *GrpcClient) SetupSchema(dbSchema string) error {
732 ctx, cancel := context.WithTimeout(context.Background(), requestTimeout)
733 defer cancel()
734 return gc.Alter(ctx, &api.Operation{Schema: dbSchema})
735}
736
737// DropAll drops all the data in the db
738func (gc *GrpcClient) DropAll() error {

Calls 1

AlterMethod · 0.80