I have one data source (Cloud SQL), and a page where I list the data. I want to create another page where I should only see the data that meets a condition.
I have tried to create a query, but it doesn't works...
The reason it is not working is due to the fact that you have a function but you are not invoking it. Get rid of the function and just leave the following line of codes:
query.filters.approver._contains = Session.getActiveUser().getEmail();
return query.run();
I believe this should make it work. Take a look at the example provided in the official documentation. Hope it helps!