add sql support in controller query