Do not apply filter to query
See original GitHub issueI have executed all commands on readme page to run on Adonis 5. Using this code :
public async index({ request, response, logger }: HttpContextContract) {
const { page = 1, perPage = 10, ...input } = request.qs()
console.log(input)
const partners = Partner.filter(input).paginate(page, perPage)
logger.info({ Page: page, PerPage: perPage }, 'Partners search success')
return response.ok(partners)
}
This is the output log :
{ name: ‘Claudio’ } <<-- input [1642161988635] INFO (pv-backend/17956 on ASUS): Partners search success Page: 1 PerPage: 10
As you can see, the debugging query logger do not contain any where statement
“sqlite” Partner (3.7 ms) SELECT COUNT(*) AS total
FROM partners
[]
“sqlite” Partner (2 ms) SELECT * FROM partners
LIMIT ? [ 10 ]
Obviously, a partner with name Claudio exist on db, but any rows was not returned.
I’m missing any things ?
Thank’s
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Filter data (Power Query) - Microsoft Support
In Power Query, you can include or exclude rows according to a specific value. A filtered column contains a small filter icon in...
Read more >Solved: Basic filter in power query editor is not filterin...
Hello! I have a problem with the power query editor when I try to filter any column in any way. The rows will...
Read more >Warning! Misleading Power Query Filtering - RADACAD
In this post I'll show you through a very simple example how misleading it can be and what it the correct way to...
Read more >Should I apply filters at the report or dashboard level?
Unfortunately i have experienced the filter in the query doesn't limit the data can be view from the same query in the dashboard....
Read more >How Query Filters Work
Filters you apply to the query definition are called query filters. You use query filters to reduce the amount of data retrieved from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok @LookinGit , thanks It working. I’m a stupid. I have linked a wrong filter file., the row wrong was
// PartnerModel.ts