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

Method IndexPrefix

x/keys.go:392–396  ·  view source on GitHub ↗

IndexPrefix returns the prefix for index keys.

()

Source from the content-addressed store, hash-verified

390
391// IndexPrefix returns the prefix for index keys.
392func (p ParsedKey) IndexPrefix() []byte {
393 buf, prefixLen := generateKey(DefaultPrefix, p.Attr, 1)
394 buf[prefixLen] = ByteIndex
395 return buf
396}
397
398// ReversePrefix returns the prefix for index keys.
399func (p ParsedKey) ReversePrefix() []byte {

Callers 5

tokensForTestFunction · 0.95
TestRebuildTokIndexFunction · 0.95

Calls 1

generateKeyFunction · 0.70

Tested by 3

tokensForTestFunction · 0.76
TestRebuildTokIndexFunction · 0.76