snowflake-connector-python
snowflake-connector-python copied to clipboard
SNOW-511739: Implement Cursor.callproc()
Since the initial public commit, Cursor.callproc() raises NotSupportedError:
https://github.com/snowflakedb/snowflake-connector-python/blob/f963b1abfe7f365b7f84f5053def7ed70e5bd2a4/src/snowflake/connector/cursor.py#L367-L378
This could be implemented similar to mysqlclient's version. My quickly written and only briefly tested implementation (which may not correctly handle parameters) is:
def callproc(self, procname, args=()):
processed_args = self._connection._process_params_pyformat(args, self)
self.execute(
'CALL %s(%s)' % (
procname,
', '.join(x for x in processed_args),
)
)
return args