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

Function Init

schema/schema.go:525–528  ·  view source on GitHub ↗

Init resets the schema state, setting the underlying DB to the given pointer.

(ps *badger.DB)

Source from the content-addressed store, hash-verified

523
524// Init resets the schema state, setting the underlying DB to the given pointer.
525func Init(ps *badger.DB) {
526 pstore = ps
527 reset()
528}
529
530// Load reads the latest schema for the given predicate from the DB.
531func Load(predicate string) error {

Callers 7

runMethod · 0.92
runFunction · 0.92
TestEmptyTypeSchemaFunction · 0.92
BenchmarkTestCacheFunction · 0.92
TestMainFunction · 0.92
TestMainFunction · 0.70

Calls 1

resetFunction · 0.85

Tested by 5

TestEmptyTypeSchemaFunction · 0.74
BenchmarkTestCacheFunction · 0.74
TestMainFunction · 0.74
TestMainFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…