Add sorting for nested list structures#194
Open
bantoinese83 wants to merge 4 commits intobenavlabs:mainfrom
Open
Add sorting for nested list structures#194bantoinese83 wants to merge 4 commits intobenavlabs:mainfrom
bantoinese83 wants to merge 4 commits intobenavlabs:mainfrom
Conversation
Add sorting functionality for nested items in one-to-many and many-to-many relationships. * Add `sort_columns` and `sort_orders` attributes to `JoinConfig` class in `fastcrud/crud/helper.py`. * Validate `sort_columns` and `sort_orders` in `JoinConfig` class. * Update `_prepare_and_apply_joins` method in `fastcrud/crud/fast_crud.py` to handle sorting of nested items. * Add test cases for sorting nested items in one-to-many and many-to-many relationships in `tests/sqlalchemy/crud/test_get_multi_joined.py`. * Add test cases for sorting nested items in one-to-many and many-to-many relationships in `tests/sqlmodel/crud/test_get_multi_joined.py`. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/igorbenav/fastcrud?shareId=XXXX-XXXX-XXXX-XXXX).
Collaborator
|
@bantoinese83 can you please fix the checks? |
corrected test function for test_get_multi_joined_sorting_nested_items_many_to_many ensured that the test correctly verifies the nested participants and the number of project records
bantoinese83
commented
Mar 20, 2025
Author
bantoinese83
left a comment
There was a problem hiding this comment.
corrected test function for test_get_multi_joined_sorting_nested_items_many_to_many
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add sorting functionality for nested items in one-to-many and many-to-many relationships.
sort_columnsandsort_ordersattributes toJoinConfigclass infastcrud/crud/helper.py.sort_columnsandsort_ordersinJoinConfigclass._prepare_and_apply_joinsmethod infastcrud/crud/fast_crud.pyto handle sorting of nested items.tests/sqlalchemy/crud/test_get_multi_joined.py.tests/sqlmodel/crud/test_get_multi_joined.py.For more details, open the Copilot Workspace session.