public async Task <IEnumerable <DataSet> > FindMatches( IReadonlyObjectDatabase <DataSet> objectDatabase, string searchText, uint maxSuggestions) { var normalizedSearchText = SearchTextNormalizer.Normalize(searchText); var searchQuery = $"Data.{nameof(DataSet.Id)} LIKE '%{normalizedSearchText}%'"; return(await objectDatabase.GetManyAsync(searchQuery, limit : maxSuggestions)); }
public Task <IEnumerable <JObject> > FindMatches( IReadonlyObjectDatabase <JObject> objectDatabase, string searchText, uint maxSuggestions) { var normalizedSearchText = SearchTextNormalizer.Normalize(searchText); var query = $"Data.Id LIKE '%{normalizedSearchText}%'"; return(objectDatabase.GetManyAsync(query, limit: maxSuggestions)); }
public async Task <IEnumerable <DataCollectionProtocolParameter> > FindMatches( IReadonlyObjectDatabase <DataCollectionProtocolParameter> objectDatabase, string searchText, uint maxSuggestions) { var normalizedSearchText = SearchTextNormalizer.Normalize(searchText); var query = $"Data.Name LIKE '%{normalizedSearchText}%'"; return(await objectDatabase.GetManyAsync(query, limit : maxSuggestions)); }