[Zope-Checkins] CVS: Products/DCOracle2/DCOracle2 - DCOracle2.py:1.91
Matthew T. Kromer
matt@zope.com
Wed, 12 Jun 2002 14:46:37 -0400
Update of /cvs-repository/Products/DCOracle2/DCOracle2
In directory cvs.zope.org:/tmp/cvs-serv27784/DCOracle2
Modified Files:
DCOracle2.py
Log Message:
Add description attribute population for SP return of a ref cursor
=== Products/DCOracle2/DCOracle2/DCOracle2.py 1.90 => 1.91 ===
#print a[0]
if 'OUT' in a[1] or allreturn:
+
if type(a[0]) is dco2.BindingArrayObjectType:
#print "bindingarray: len %d" % len(a[0])
if len(a[0]) == 1:
#print "bindingarray contents:"
#print a[0][0]
v = a[0][0]
- # Might do a conversion here
+
+ # If we got a single cursor, describe it
+ if isinstance(v, cursor.__class__):
+ v.description = v.describe()
results.append(v)
else:
#print "bindingarray contents:"
@@ -1461,7 +1465,9 @@
for i in xrange(len(a[0])):
#print a[0][i]
v = a[0][i]
- # Might do a conversion here
+ # If we got a cursor, describe it
+ if isinstance(v, cursor.__class__):
+ v.description = v.describe()
t.append(v)
results.append(t) # converted into a list
else:
@@ -1477,7 +1483,6 @@
d = self.__dict__
-
if d.has_key(name): return d[name]
name = upper(name)
if d.has_key(name): return d[name]
@@ -1531,7 +1536,6 @@
newproc._description, newproc.__name__)
d = newproc.__dict__ # Temporarily override the target dict
inpkg = 1
-
# Do all entries within the package
for p in desc.keys():