New issue report by MarkRoddy:
You need to pass a nested list of empty lists into the vectorized python
method that wraps a stored procedure that does not have any arguments:
package.p_noparms_V([[],[],[]])
This seems a little counter-intuitive. What about passing in an integer
for the number of times the procedure should be called, and then
generating the required data structure that needs to be passed to
cursor.executemany()? The outputted code would change from:
arguments = []
for i in range(len(parmlist)):
dict = {}
arguments.append(dict)
result = self.curs.executemany(
"begin ALLTYPES.P_NOPARMS(); end;", arguments)
to:
arguments=[{}]*call_count;
result = self.curs.executemany(
"begin ALLTYPES.P_NOPARMS(); end;", arguments)
Though I am a little hesitant about this solution as it changes the call
signature for a vectorized function which is consistant in all other cases.
Issue attributes:
Status: Accepted
Owner: MarkRoddy
Labels: Type-Enhancement Priority-Medium
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
Yes, what you say sounds reasonable. This case hadn't occurred to me.
Perhaps if we allow either the list or the count, so somebody who is
mechanically generating calls won't have to special-case having no parms?
Anybody else have an opinion?
if hassattr(args,'__len__'):
call_count=len(args)
else:
call_count=args
Then anything generated with a length property (tuple, set, etc.) or a
numeric value can be passed.
-Mark