-
Notifications
You must be signed in to change notification settings - Fork 129
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
Allow repo opts to be passed to paginate/2 #102
Conversation
Repo.paginate/2 should behave like a normal repo operation where user can pass arbitrary/predefined repo options such as those indicated in https://hexdocs.pm/ecto/Ecto.Repo.html#module-shared-options
This would be a lovely feature to have. |
Neat! I am also hoping for the timeout option to be passable. @dgigafox are you able to manually run tests on your PR screen? or maybe push an empty commit to trigger the test workflow please? The maintainer added a test hook for PRs in June after this was opened in May. I'm curious if green tests would make this easier to merge 🙏 Thanks! |
Oh wait, your commit was a year later 🤦 . nevermind me 😅 |
@cpjolicoeur is there an opportunity to get this to merge and released? Do you need help here? We need this to pass the |
@cpjolicoeur would you like me to do? I am not sure if @dgigafox is still around after few years |
Please, if this is something you are interested in carrying forward, you can take it over and/or make a new PR that supersedes/updates this one. We (MojoTech) recently took over maintenance of the scrivener projects and haven't yet gone through and triaged all the old/existing issues and pull requests yet. If this is a PR of use to you, please give us a hand, and continue to move it forward and we can get it in and released. |
@cpjolicoeur, trying to improve the situation, I am a bit confused; what is that |
Right now we only can pass
:prefix
repo opt toRepo.paginate/2
but it should behave like a normal repo operation where the user can pass arbitrary/predefined repo options such as those indicated in https://hexdocs.pm/ecto/Ecto.Repo.html#module-shared-optionsFor example, we should be able to pass
:log
and:admin
as opts toRepo.paginate/2
like this:Now the query will be logged and we can use the arbitrary opts such as admin in the
prepare_query/3
callback like so: