pypaginate.adapters.memory.sorting
In-memory sort backend.
Implements the SortBackend protocol for Python sequences by delegating to
the native pypaginate._core engine, which applies the ordered sort specs
(direction + null placement per key) and returns a row permutation.
Classes
Sort backend for in-memory sequences (native |
Module Contents
- class pypaginate.adapters.memory.sorting.MemorySortBackend
Sort backend for in-memory sequences (native
_core).- static apply_sorting(query: object, sorting: collections.abc.Sequence[pypaginate.domain.specs.SortSpec]) object
Apply sort specs to a sequence.
- Parameters:
query – A Python sequence of items.
sorting – Sort specifications (applied in priority order).
- Returns:
New sorted list of items.