I have a table in Azure Mobile Services. On the client side, how can I get the count of elements in the database that have the field “value” less than 100?
I am interested only in the count and not in all the results. What is the most optimal way to do this on the client side?
The best way to do this today would be to write custom SQL query. e.g.
Since you may not want to always do this, you could use a request parameter (http://blog.amitapple.com/post/30921523746/customparametersinmobileservices) to indicate that you want to perform this special count operation instead of a normal request.
The Mobile Services team will end custom service operations soon, so you can just have an endpoint that can receive requests, execute scripts and return a response – irrespective of whether it is backed by a table or not.