(w io.Writer, o *pb.Posting)
| 425 | } |
| 426 | |
| 427 | func 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 | } |
| 445 | func rollupKey(db *badger.DB) { |
| 446 | txn := db.NewTransactionAt(opt.readTs, false) |
| 447 | defer txn.Discard() |
no test coverage detected