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

Function appendPosting

dgraph/cmd/debug/run.go:427–444  ·  view source on GitHub ↗
(w io.Writer, o *pb.Posting)

Source from the content-addressed store, hash-verified

425}
426
427func appendPosting(w io.Writer, o *pb.Posting) {
428 fmt.Fprintf(w, " Uid: %d Op: %d ", o.Uid, o.Op)
429
430 if len(o.Value) > 0 {
431 fmt.Fprintf(w, " Type: %v. ", o.ValType)
432 from := types.Val{
433 Tid: types.TypeID(o.ValType),
434 Value: o.Value,
435 }
436 out, err := types.Convert(from, types.StringID)
437 if err != nil {
438 fmt.Fprintf(w, " Value: %q Error: %v", o.Value, err)
439 } else {
440 fmt.Fprintf(w, " String Value: %q", out.Value)
441 }
442 }
443 fmt.Fprintln(w, "")
444}
445func rollupKey(db *badger.DB) {
446 txn := db.NewTransactionAt(opt.readTs, false)
447 defer txn.Discard()

Callers 3

showAllPostingsAtFunction · 0.85
historyFunction · 0.85
lookupFunction · 0.85

Calls 2

TypeIDTypeAlias · 0.92
ConvertFunction · 0.92

Tested by

no test coverage detected