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

Method IsOfType

x/keys.go:358–371  ·  view source on GitHub ↗

IsOfType checks whether the key is of the given type.

(typ byte)

Source from the content-addressed store, hash-verified

356
357// IsOfType checks whether the key is of the given type.
358func (p ParsedKey) IsOfType(typ byte) bool {
359 switch typ {
360 case ByteCount, ByteCountRev:
361 return p.IsCountOrCountRev()
362 case ByteReverse:
363 return p.IsReverse()
364 case ByteIndex:
365 return p.IsIndex()
366 case ByteData:
367 return p.IsData()
368 default:
369 }
370 return false
371}
372
373// SkipPredicate returns the first key after the keys corresponding to the predicate
374// of this key. Useful when iterating in the reverse order.

Callers

nothing calls this directly

Calls 4

IsCountOrCountRevMethod · 0.95
IsReverseMethod · 0.95
IsIndexMethod · 0.95
IsDataMethod · 0.95

Tested by

no test coverage detected