I can see from the documentation that it is possible to perform a wildcard search against a column when using AutoQuery so that the following SQL is generated:
SELECT * [FROM MY.TABLE]
WHERE ([InterestingColumn] LIKE '%OneThing%')
Is there a way to perform multiple wilcard searches against one column using AutoQuery so that the resulting SQL would be semantically equivalent to the following:
SELECT * [FROM MY.TABLE]
WHERE ([InterestingColumn] LIKE '%OneThing%') OR ([InterestingColumn] LIKE '%AnotherThing%')
The default query behavior for AutoQuery Services is AND where each additional field acts like a filter. You can change this behavior by annotating your AutoQuery Service with QueryTerm.Or so each criteria are combined, e.g:
[QueryDb(QueryTerm.Or)]
[Route("/table/query")]
public class QueryTable : QueryDb<Table> { }
This will let you specify multiple queries using the same field and have all search criterias combined with OR as seen in your SQL output:
You can’t have multiple fields on the same DTO, so you would need to use the free path + queryString option, e.g:
var client = new JsonServiceClient(uri);
var response = client.Get<QueryResponse<Table>>(
"/query?InterestingColumnContains=OneThing&InterestingColumnContains=AnotherThing");