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

Document using a fragment with order_by/3 #2271

Merged
merged 2 commits into from
Oct 12, 2017
Merged

Document using a fragment with order_by/3 #2271

merged 2 commits into from
Oct 12, 2017

Conversation

nathanl
Copy link
Contributor

@nathanl nathanl commented Oct 12, 2017

The documentation didn't show that a fragment could be used with order_by/3, so I added my own use case.

Is it too weird? The idea is to have an order that's shuffled but stable for pagination (in the case where I'm using it, inserting and deleting records is fairly rare; such changes would change the ordering some because a new record might appear in the middle of the result set.)

The point is not to show this particular use case, it's just the example I have for why fragments might be needed.

@josevalim josevalim merged commit dac4fbd into elixir-ecto:master Oct 12, 2017
@josevalim
Copy link
Member

❤️ 💚 💙 💛 💜

@nathanl nathanl deleted the nathanl/order-fragment-example branch October 12, 2017 12:47
bartekupartek pushed a commit to bartekupartek/ecto that referenced this pull request Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants