-
Notifications
You must be signed in to change notification settings - Fork 205
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
Override total_entries and total_pages #46
Comments
I guess if you do this it works:
|
Yes you could do that. However, I suppose this is more for the Scrivener project to tackle than here. render conn, :index, page: %{page | total_pages: new_total_pages, total_entries: new_total_entries} But first, think about the fact that you're doing this before you do it. If the |
The reason for this is to get around the limitation of Scrivener.Ecto when not selecting * and needing an accurate result count. My queries are more complex than usual, with 6 joins, a where and a select on 10 columns across 7 tables. The count distinct can't be on *. |
either way, I'm not sure how this project should change to help you. You can already override the total_pages and total_entries like I showed, and then the helper function this project exposes will work just the same... |
@coreyk the newest release of |
I have a use case where i need to pass the total entries and total pages from a more complex query.
How can I override total_entries and total_pages from Scrivener.Ecto?
This doesn't work (from the Scrivener.Ecto README):
The text was updated successfully, but these errors were encountered: