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

Function applyInitialTypes

worker/embedded.go:50–61  ·  view source on GitHub ↗
(ns, ts uint64)

Source from the content-addressed store, hash-verified

48}
49
50func applyInitialTypes(ns, ts uint64) {
51 initialTypes := schema.InitialTypes(ns)
52 for _, t := range initialTypes {
53 if _, ok := schema.State().GetType(t.TypeName); ok {
54 continue
55 }
56 // It is okay to write initial types at ts=1.
57 if err := updateType(t.GetTypeName(), t, ts); err != nil {
58 glog.Errorf("Error while applying initial type: %s", err)
59 }
60 }
61}
62
63func SetMaxUID(uid uint64) {
64 groups().Lock()

Callers 1

ApplyInitialSchemaFunction · 0.85

Calls 6

InitialTypesFunction · 0.92
StateFunction · 0.92
updateTypeFunction · 0.85
GetTypeNameMethod · 0.80
GetTypeMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected