Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Sort by primary key in descending order #218

Closed
novoj opened this issue Aug 10, 2023 · 0 comments · Fixed by #360
Closed

Sort by primary key in descending order #218

novoj opened this issue Aug 10, 2023 · 0 comments · Fixed by #360
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@novoj
Copy link
Collaborator

novoj commented Aug 10, 2023

The implicit ordering is ASC by primary key, but we have discovered that we lack the possibility to order by PK in descending fashion. Although this ordering is not widely used, we should support it. Because we have orderign constraints entityPrimaryKeyInFilter and entityPrimaryKeyExact we should provide new constraint to be used like that:

query(
   orderBy(
      entityPrimaryKey(DESC)
   )
)

And this would produce output sorted by PK in descending order.

@novoj novoj added the enhancement New feature or request label Aug 10, 2023
@novoj novoj added this to the Alpha milestone Aug 10, 2023
@novoj novoj self-assigned this Aug 10, 2023
novoj added a commit that referenced this issue Dec 5, 2023
The implicit ordering is ASC by primary key, but we have discovered that we lack the possibility to order by PK in descending fashion. Although this ordering is not widely used, we should support it. Because we have orderign constraints `entityPrimaryKeyInFilter` and `entityPrimaryKeyExact` we should provide new constraint to be used like that:

```
query(
   orderBy(
      entityPrimaryKey(DESC)
   )
)
```

And this would produce output sorted by PK in descending order.
@novoj novoj linked a pull request Dec 5, 2023 that will close this issue
@novoj novoj closed this as completed in #360 Dec 5, 2023
novoj added a commit that referenced this issue Dec 5, 2023
…cending-order

#218 sort by primary key in descending order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant