Using login id in MySQL query

I want to restrict the query based on the user who has logged in. Is it possible to use the login id in the query?

That is not currently possible. Is it possible to restrict the query in the data source settings instead by setting up a data source for MySQL with a restricted sql user?

thanks! For now what I did was added a variable and while redirecting from external app I set it. To avoid use from manipulating it I have set up an nginx secure_link…