dgraph
dgraph copied to clipboard
feat(cmd/debug): Add parse_key flag to debug tool.
This adds a dgraph debug --parse_key
flag that can return the ParsedKey
struct of a hex key. This is useful if there's a lone key that you want parse
without having to have a p directory around---this flag does not need a p
directory, just the hex key string.
Example (v20.11 key format)
$ dgraph debug --parse_key 00000375726c000000000000000001
{d} Key: {ByteType:0 Attr:url Uid:1 HasStartUid:false StartUid:0 Term: Count:0 bytePrefix:0}
This tells you that the key 00000375726c000000000000000001 is for the
predicate url
and the UID 0x1
.