Added table prepend option to getWhereConditions in query generator
Added unit tests for query generator