schotime/NPoco — pull request #15 by Rhysling (2013-04-27 23:06:56+00:00)
Title: Changed Page<T> BuildPageQuery and Count logic to make more general.

Did not seem to be working; now passes all tests, including new tests
using queries on a test table with results narrowed by the DISTINCT keyword.

To generate a pageable result set, I take the original SELECT query, strip the final ORDER BY clause and use it as a subquery within the logic to generate the row numbers. The prior logic stripping the front of the select clause seemed to be erroring out and I think would give the wrong results in a query using (and needing) DISTINCT.

Please let me know if I have done something boneheaded. Thanks, Bob