Making it easier to add more query types to smartQuery later.  Also adding tests for supported smartQuery SQL patterns.