New issue 15 by vladislav.nazarenko: Generating of function with array
parameters
http://code.google.com/p/orapig/issues/detail?id=15
Hello Mark,
here some small problems I got after generating for a function using array
as parameters
What steps will reproduce the problem?
1. Just let it generate
What is the expected output? What do you see instead?
This is the output I got:
def getSomething(self,parr1,parr2,parr3,parr4,parr5):
"""
(No doc string for this function)
(orapig --helpfmt for more info)
"""
parr1=self.curs.arrayvar(cx_Oracle.NUMBER, parr1)
parr2=self.curs.arrayvar(cx_Oracle.NUMBER, parr2)
parr3=self.curs.arrayvar(cx_Oracle.DATETIME, parr3)
parr4=self.curs.arrayvar(cx_Oracle.STRING, parr4)
parr5=self.curs.arrayvar(cx_Oracle.STRING, parr5)
rv=self.curs.callfunc('VLADTESTPACKAGE.GETSOMETHING',cx_Oracle.STRING,[parr1,parr2,parr3,parr4,parr5])
if self.autocommit:
conn.commit()
return rv
It couldn't work, as the all variable arrays were declared as a single
string. This caused python errors
So you probably forgot the "\n" symbol.
There is also a semantic error there. The call like
parr1=self.curs.arrayvar(cx_Oracle.NUMBER, parr1)
makes it impossible to get values of OUT arrays out of the function, as the
variable parr1 had pointed to another list before the call took place.
The Variables should be assigned through the list functions (like append or
del)
What version of the product are you using? On what operating system?
orapig1.1 on Linux
--
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