dgraph icon indicating copy to clipboard operation
dgraph copied to clipboard

feat(cmd/debug): Add parse_key flag to debug tool.

Open danielmai opened this issue 3 years ago • 1 comments

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.


This change is Reviewable

danielmai avatar Mar 24 '21 06:03 danielmai

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 29 '22 07:04 CLAassistant