Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Enabling sort_attribute#138

Open
luord wants to merge 9 commits into
biosustain:masterfrom
luord:default-sort
Open

Enabling sort_attribute#138
luord wants to merge 9 commits into
biosustain:masterfrom
luord:default-sort

Conversation

@luord

@luord luord commented Jul 16, 2018

Copy link
Copy Markdown
Contributor

In a project I did recently, I needed to change the default sort, I saw that this attribute existed in the Meta class for ModelResource, but wasn't being used.

This PR is an attempt of enabling it for usage.

@luord

luord commented Jul 24, 2018

Copy link
Copy Markdown
Contributor Author

Hadn't noticed the conflicts, updated now with the conflicts fixed.

@luord

luord commented Dec 6, 2018

Copy link
Copy Markdown
Contributor Author

Merged the reversion from the other branch.

Don't know if this will ever be merged but, for what it's worth, I think the sort_attribute should be passed as an argument and not decided exclusively from the meta in each manager.

This way loosens coupling, IMO, and the sort could work for any manager and not just sqlalchemy, plus it's more consistent on what the sort is expected to be. Namely a tuple of the field, its name and reverse.

@coveralls

coveralls commented Dec 8, 2018

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.06%) to 89.172% when pulling 22a5d64 on luord:default-sort into 66f11dc on biosustain:master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants