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

Function GetIndexingPredicates

schema/schema.go:219–232  ·  view source on GitHub ↗

GetIndexingPredicates returns the list of predicates for which we are building indexes.

()

Source from the content-addressed store, hash-verified

217
218// GetIndexingPredicates returns the list of predicates for which we are building indexes.
219func GetIndexingPredicates() []string {
220 s := State()
221 s.Lock()
222 defer s.Unlock()
223 if len(s.mutSchema) == 0 {
224 return nil
225 }
226
227 ps := make([]string, 0, len(s.mutSchema))
228 for p := range s.mutSchema {
229 ps = append(ps, p)
230 }
231 return ps
232}
233
234// SetType sets the type for the given predicate in memory.
235// schema mutations must flow through the update function, which are synced to the db.

Callers 1

HealthMethod · 0.92

Calls 3

StateFunction · 0.70
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected