Making it easier to add more query types to smartQuery later.  Also addi...

...ng tests for supported smartQuery SQL patterns.