AutoQuery and'ing 2 groups of or's

Is there a way to get autoquery to produce a where clause that and’s two groups of or’s?

i.e.
where (a.col1 like ‘%a%’ or a.col2 like ‘%a%’) and (b.col1 like ‘%b%’ or b.col2 like ‘%b%’)

It’s not a built-in feature as AutoQuery Services filters have a default AND behavior that can be changed to use OR behavior for all or specific fields, but there’s no support for custom groups of multiple columns.

But you could use a customizable adhoc query or a custom implicit convention with a single query that utilizes multiple OR fields in a single term, e.g:

public class MyQuery : QueryDb<Table>
{
    [QueryDbField(Template = "Col1 LIKE {Value} OR Col2 LIKE {Value}", 
                  ValueFormat="%{0}%")]
    public string GroupA { get; set; }

    [QueryDbField(Template = "Col1 LIKE {Value} OR Col2 LIKE {Value}", 
                  ValueFormat="%{0}%")]
    public string GroupB { get; set; }
}