-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
the sort
function sorts the result of the query according to a predicate modeled on the sorted
function in python
sorting by simple key
sorting by simple key is done on the sorting of one of the attributes of the base collection
qjoin.on(persons) \
.join(cities, key='city') \
.sort(key='city') \
.all()
sorting by artificial key
le tri par clé artificielle s'effectue sur l'attribut d'un élément de n'importe quelle collection, que ce soit la collection de base ou les collections de jointures.
qjoin.on(persons) \
.join(cities, key='city') \
.sort(key=lambda p, c: p.city) \
.all()
You have to handle the case in the predicate where a join can fail. If some elements of the persons collection do not have joins, then the value None must be treated for the c
parameter.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request