-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for descending sibling ordering, multi-field sibling orde…
…ring, and related field sibling ordering (#62) * Update compiler.py to support ordering options Update the compiler to support descending, and multi-field ordering through the use of the ROW_NUMBER() SQL window expression. * Update query.py to support multi-field ordering Update the order_siblings_by method to take a list of fields * Update compiler.py Fix sibling_order_as_sql * Update compiler.py Remove the quoting of the order_by param because its now handled by django when creating the ROW_NUMBER() SQL * Update compiler.py added tuple handling to sibling_order_as_sql * Update query.py Fix description of order_siblings_by to reflect support of multi-field ordering * Update compiler.py Modified the compiler to accept multi-direction and multi-field ordering * Update compiler.py Updated compiler to use a basic django query to help write the __rank_table used for ordering * Update models.py Added models for testing ordering based on a related field * Update test_queries.py Added tests for ordering by descending order, ordering by a related field, and ordering by multiple fields * Update test_queries.py Make ordering during test_attributes deterministic
- Loading branch information
Showing
4 changed files
with
199 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.