/// <summary> /// Filters documents that only have the provided ids. /// Note, this filter does not require the _id field to be indexed since it works using the _uid field. /// </summary> public FilterContainer Ids(IEnumerable <string> values) { IIdsFilter filter = new IdsFilterDescriptor(); filter.Values = values; this.SetCacheAndName(filter); return(this.New(filter, f => f.Ids = filter)); }
/// <summary> /// Filters documents that only have the provided ids. /// Note, this filter does not require the _id field to be indexed since it works using the _uid field. /// </summary> public FilterContainer Ids(IEnumerable <string> types, IEnumerable <string> values) { IIdsFilter filter = new IdsFilterDescriptor(); if (!types.HasAny() || types.All(t => t.IsNullOrEmpty())) { return(CreateConditionlessFilterDescriptor(filter, null)); } filter.Values = values; filter.Type = types; this.SetCacheAndName(filter); return(this.New(filter, f => f.Ids = filter)); }
/// <summary> /// Filters documents that only have the provided ids. /// Note, this filter does not require the _id field to be indexed since it works using the _uid field. /// </summary> public FilterContainer Ids(string type, IEnumerable <string> values) { IIdsFilter filter = new IdsFilterDescriptor(); if (type.IsNullOrEmpty()) { return(CreateConditionlessFilterDescriptor(filter, null)); } filter.Values = values; filter.Type = new [] { type }; this.SetCacheAndName(filter); return(this.New(filter, f => f.Ids = filter)); }