• Andreas Brandl's avatar
    Split keyset pagination in two steps · 619d5c95
    Andreas Brandl authored
    Keyset pagination steps:
    1. Apply LIMIT clause
    1. Add header with link to next page
    
    (2) is based on the last record in the current page, to derive the
    filter values for the next page.
    
    With splitting this into two explicit steps, we make sure that (2)
    always operates on the actual data rather than - possibly - an
    intermediate state of the database query.
    619d5c95
pagination_strategies.rb 959 Bytes