singlestoredb.connection.Cursor.callproc

abstract Cursor.callproc(name: str, params: Sequence[Any] | None = None) None

Call a stored procedure.

The result sets generated by a store procedure can be retrieved like the results of any other query using fetchone(), fetchmany(), or fetchall(). If the procedure generates multiple result sets, subsequent result sets can be accessed using nextset().

Examples

>>> cur.callproc('myprocedure', ['arg1', 'arg2'])
>>> print(cur.fetchall())
Parameters:
  • name (str) – Name of the stored procedure

  • params (iterable, optional) – Parameters to the stored procedure