implement FakeRest filters
fblinks opened this issue · comments
Hi,
I want to implement filters like the ones exposed by FakeRest, that should be the dialect used by React Admin Simple Rest Data Provider.
For example, if I pass the filter {"id_gt":100}
I would like to have a query such as
SELECT * from x WHERE id > 100;
while now I get something like:
SELECT * from x WHERE id_gt = 100;
I'm not sure where and how I should implement those kind of filters
You can handle the logic in the get
action:
app.use(
crud('/admin/users', {
get: ({ filter, limit, offset, order }) =>
// do whatever you need with filter here
})
)