FreeQuery: get rid of unnecessary `QueryMain`
FreeQuery: helper method to iterate over ResultSet