GetIndexingPredicates returns the list of predicates for which we are building indexes.
()
| 217 | |
| 218 | // GetIndexingPredicates returns the list of predicates for which we are building indexes. |
| 219 | func 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. |