Getting back a list or PagedResult can result in confusion, and possible code breakage when crossing fetch_size rows. For example, len(results) works with lists, breaks with the pagedResult.
We need to normalize this somehow.
What I was going for:
always return the same type of object
extend some backwards-compatibility by offering a "list mode" if the result set is accessed like that, as opposed to iterator
prevent list mode if results were iterated
warn if materializing list when results are paged
In this way, there should be no surprising changes within a given application context. No mode of access will ever break if result size changes, but they will receive warnings.
+1 Nice clean change. should ResultSet implement _len_? Might be useful.
Disregard the _len_ comment explained that it's not implemented because _current_rows might not be something that has length (lazy results).