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

Function exportSchema

backup/run.go:428–443  ·  view source on GitHub ↗
(writers *worker.Writers, val []byte, pk x.ParsedKey)

Source from the content-addressed store, hash-verified

426}
427
428func exportSchema(writers *worker.Writers, val []byte, pk x.ParsedKey) error {
429 var kv *bpb.KV
430 var err error
431 if pk.IsSchema() {
432 kv, err = worker.SchemaExportKv(pk.Attr, val, true)
433 if err != nil {
434 return err
435 }
436 } else {
437 kv, err = worker.TypeExportKv(pk.Attr, val)
438 if err != nil {
439 return err
440 }
441 }
442 return worker.WriteExport(writers, kv, "rdf")
443}
444
445func (bw *bufWriter) Write(buf *z.Buffer) error {
446 kv := &bpb.KV{}

Callers 1

WriteMethod · 0.85

Calls 4

SchemaExportKvFunction · 0.92
TypeExportKvFunction · 0.92
WriteExportFunction · 0.92
IsSchemaMethod · 0.80

Tested by

no test coverage detected