Executes the query and maps results to a list of objects using the provided mapper.
Executes the query and maps results to a list of objects of the given type.