Closed pcdevil closed 8 years ago
Hi,
No it doesn't do that. The plugin can't assume what database or ORM you're using. It can't returns the results for you. It just takes care of the metadata.
If you want to create a boilerplate for your ORM, you should do a method yourself.
Thank you the information.
I dug into the hapijs API documentation and found onPreResponse
extension point to mutate my results.
Hello,
I want to use
hapi-pagination
in my project and first thing I noticed the library doesn't narrow down the results based on thepage
andlimit
properties onrequest.query
.I was assumed the package does this so I don't need to do it myself because it would create a boilerplate to do it all my route, but I also don't see any information about this in documentation.
Can you give me a hint how to use it without write something like this in my every handler?:
(Sorry, this isn't an issue in the general sense but had to ask it.)