Was wondering if anyone can point me in the right direction here, what
would be the Django style way to annotate a set with a row number in
some way like:-
Book.objects.all().order_by('date_added').annotate(row_num=RowNumber
('id'))
Unfortunately PostgreSQL does not support ROW_NUMBER yet so I can't
just tack this on with .extra(). Thanks in advance for any tips!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---