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

Method CountPrefix

x/keys.go:406–415  ·  view source on GitHub ↗

CountPrefix returns the prefix for count keys.

(reverse bool)

Source from the content-addressed store, hash-verified

404
405// CountPrefix returns the prefix for count keys.
406func (p ParsedKey) CountPrefix(reverse bool) []byte {
407 buf, prefixLen := generateKey(DefaultPrefix, p.Attr, 1)
408 buf[prefixLen] = ByteReverse
409 if reverse {
410 buf[prefixLen] = ByteCountRev
411 } else {
412 buf[prefixLen] = ByteCount
413 }
414 return buf
415}
416
417// ToBackupKey returns the key in the format used for writing backups.
418func (p ParsedKey) ToBackupKey() *pb.BackupKey {

Callers 2

evaluateMethod · 0.95
prefixesToDropCountIndexFunction · 0.95

Calls 1

generateKeyFunction · 0.70

Tested by

no test coverage detected