public static IEnumerable Select(IEnumerable items, IQueryParameter param, IListIndexes indexes = null) { IListIndex index = indexes?.GetIndex(param.Name); if (index == null) { return(index.Scan(param)); } else { return(Search(items, param)); } }
public static IEnumerable Select(IEnumerable items, IQueryParameter param, IListIndexes indexes = null) { if (param.AlwaysTrue) { return(items); } if (param.Comparer.Type == CompareTypes.Distinct) { return(Distinct(items, param.Invoker)); } IListIndex index = indexes?.GetIndex(param.Name); if (index == null) { return(index.Scan(param)); } else { return(Search(items, param)); } }