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

Method HasTokenizer

schema/schema.go:426–433  ·  view source on GitHub ↗

HasTokenizer is a convenience func that checks if a given tokenizer is found in pred. Returns true if found, else false.

(ctx context.Context, id byte, pred string)

Source from the content-addressed store, hash-verified

424// HasTokenizer is a convenience func that checks if a given tokenizer is found in pred.
425// Returns true if found, else false.
426func (s *state) HasTokenizer(ctx context.Context, id byte, pred string) bool {
427 for _, t := range s.Tokenizer(ctx, pred) {
428 if t.Identifier() == id {
429 return true
430 }
431 }
432 return false
433}
434
435// IsReversed returns whether the predicate has reverse edge or not
436func (s *state) IsReversed(ctx context.Context, pred string) bool {

Callers 2

handleRegexFunctionMethod · 0.80
handleMatchFunctionMethod · 0.80

Calls 2

TokenizerMethod · 0.95
IdentifierMethod · 0.65

Tested by

no test coverage detected