Add `paginate_rows()` method
This PR adds a paginate_rows() method to the extension object that behaves like paginate(), except its items are sqlalchemy.Row instances instead of whatever was the in the first column of the select(). This makes it possible to paginate compound selects without having to fall back to the legacy Query API.
- Fixes #1168.
Checklist:
- [x] Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
- [x] Add or update relevant docs, in the docs folder and in code.
- [x] Add an entry in
CHANGES.rstsummarizing the change and linking to the issue. - [x] Add
.. versionchanged::entries in any relevant code docs. - [x] Run
pre-commithooks and fix any issues. - [x] Run
pytestandtox, no tests failed.
Would love to see this merged, but it seems to be blocked by a merge conflict for now. @jwodder could you look into this so we can get maintainers to consider merging this?
I have rebased to remove the merge conflicts. The failing tests are in code that was already failing on the main branch.
@davidism Any chance of looking into merging this? It's a major roadblock for anyone trying to get rid of legacy query interface.