Stored Procedures: rpc()

You can call stored procedures as a "Remote Procedure Call".

That's a fancy way of saying that you can put some logic into your database then call it from anywhere. It's especially useful when the logic rarely changes - like password resets and updates.

1final data = await supabase
2  .rpc('hello_world');

Examples#

Call a stored procedure#

This is an example invoking a stored procedure.

1final data = await supabase
2  .rpc('hello_world');

With Parameters#

1final data = await supabase
2  .rpc('echo_city', params: { 'name': 'The Shire' });