Skip to content

Allow index IsDescending to get empty array for all-descending #28489

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Jul 26, 2022

Conversation

roji
Copy link
Member

@roji roji commented Jul 21, 2022

Improves #27210 by allowing aan empty list parameter to IsDescending, meaning that all index columns should be descending.
Also normalizes explicitly-set all-ascending/all-descending to null/empty array respectively.

(addresses API review, #27588)

@roji roji requested a review from AndriySvyryd July 21, 2022 16:47
@roji roji mentioned this pull request Jul 21, 2022
53 tasks
@roji roji linked an issue Jul 21, 2022 that may be closed by this pull request
@roji
Copy link
Member Author

roji commented Jul 21, 2022

Question: is it worth introducing AllDescending or similar on IndexAttribute? Right now to specify all-descending, you do this ugly thing:

[Index(..., IsDescending = new bool[0])]

@roji roji force-pushed the IndexDescending branch from a6d14d9 to 66cb693 Compare July 21, 2022 17:23
@AndriySvyryd
Copy link
Member

I'd prefer adding AllDescending to giving special meaning to an empty array
@dotnet/efteam

@roji roji force-pushed the IndexDescending branch from 66cb693 to e29487e Compare July 26, 2022 09:49
@roji
Copy link
Member Author

roji commented Jul 26, 2022

@dotnet/efteam added AllDescending.

@roji roji merged commit 129bacc into dotnet:main Jul 26, 2022
@roji roji deleted the IndexDescending branch July 26, 2022 21:20
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for index ordering (ASC/DESC)
2 participants