Merge lp:~adeuring/lazr.batchnavigator/lazr.batchnavigator-urlencode-batch-params into lp:lazr.batchnavigator
Status: | Merged |
---|---|
Merged at revision: | 43 |
Proposed branch: | lp:~adeuring/lazr.batchnavigator/lazr.batchnavigator-urlencode-batch-params |
Merge into: | lp:lazr.batchnavigator |
Diff against target: |
140 lines (+44/-21) 2 files modified
src/lazr/batchnavigator/_batchnavigator.py (+26/-21) src/lazr/batchnavigator/tests/test_batchnavigator.py (+18/-0) |
To merge this branch: | bzr merge lp:~adeuring/lazr.batchnavigator/lazr.batchnavigator-urlencode-batch-params |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Benji York (community) | code | Approve | |
Review via email: mp+69118@code.launchpad.net |
Description of the change
The class lazr.batchnavig
Batch URLs are generated by BatchNavigator.
But the main idea of IRangeFactory is that we can use other factories than the only currently existing implementation, ListRangeFactory, which integers for the memo value. Specifically, I am working on a class StormRangeFactory, which will create memo parameters from SQL table columns used to sort the query result. (This allows us to replace the OFFSET clause with something like WHERE Table.index_col > last_batch_
This means that we will have soon more or less arbitrary values in the memo field, and we could end up with a memo value like 'foo & bar'. In other words: URL query parameter 'meo' must be properly URL-escaped.
The implementation and the test are straightforward, I think.
Ah, and I removed trailing whitespaces o a few lines.
This looks good. Thanks.