Stored Procedures: Description, Limits, and Examples

image



In this article I will talk about stored procedures. How to use them and why, limits, examples of cool procedures that I use.



Stored procedures allow executing code on the server side of the API in the same way as the execute method, but without passing the procedure code over the network.
A stored procedure is a predetermined algorithm that allows you to implement a quick call to several API methods at once, similar to the principle of the execute method, but without transmitting the code over the network (in the request you must specify only the name of the procedure and the necessary parameters).



You can create new stored procedures on the corresponding tab in the editing section of your application.
The code for stored procedures is written in the VKScript language.



image

VKScript for the execute method is not always small, and passing it in the request is very bold. Also for stored procedures, a convenient client is implemented directly in Vkontakte. Pull the procedure by its name, in this case, you no longer need to pass code . Without using stored procedures when sending requests from the client, your code sent to the API can be viewed.

By sending the code from the browser to the API, anyone can view it. When sending only the name of the stored procedure and parameters, the code will not be available.


Limits

Max. requests per second 3
Max. response size 5 MB
Max. number of calls within the procedure to API methods 25
Max. number of operations within the procedure 1000




My procedures






All Articles