Skip to content

Commit 2573c1a

Browse files
committed
feat(cmd/debug): Add key type prefix.
1 parent dd0be2f commit 2573c1a

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

dgraph/cmd/debug/run.go

+16-1
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,22 @@ func run() {
897897
if err != nil {
898898
log.Fatalf("Error while parsing key: %v\n", err)
899899
}
900-
fmt.Printf("Key: %+v\n", pk)
900+
if pk.IsData() {
901+
fmt.Printf("{d}")
902+
}
903+
if pk.IsIndex() {
904+
fmt.Printf("{i}")
905+
}
906+
if pk.IsCountOrCountRev() {
907+
fmt.Printf("{c}")
908+
}
909+
if pk.IsSchema() {
910+
fmt.Printf("{s}")
911+
}
912+
if pk.IsReverse() {
913+
fmt.Printf("{r}")
914+
}
915+
fmt.Printf(" Key: %+v\n", pk)
901916
return
902917
}
903918

0 commit comments

Comments
 (0)