[Zope-Checkins] CVS: Products/DCOracle2/DCOracle2 - DCOracle2.py:1.81.4.2

Matthew T. Kromer matt@zope.com
Tue, 12 Feb 2002 16:22:28 -0500


Update of /cvs-repository/Products/DCOracle2/DCOracle2
In directory cvs.zope.org:/tmp/cvs-serv27082/DCOracle2

Modified Files:
      Tag: dco2-object-branch
	DCOracle2.py 
Log Message:
More TABLE OF stuff


=== Products/DCOracle2/DCOracle2/DCOracle2.py 1.81.4.1 => 1.81.4.2 ===
 
 DEFAULTPROCSIZE=256
+DEFAULTPROCCOUNT=256
 
 DateConversion = [None,] 
 
@@ -1210,10 +1211,21 @@
                     l = DEFAULTPROCSIZE
 
                 dty = a[2][0]
+                count = 1
 
                 # Based on the data type, we may need to do some special
                 # transforms (e.g. sending numbers through as strings)
 
+                if dty == 251: # PL/SQL Table of 
+                    # go find out what the table is really of
+                    tabof = a[2][6][3]
+                    dty = tabof[0]
+                    l = tabof[1]
+                    if len(cursor._sizes) > i:
+                        count = cursor._sizes[i] or DEFAULTPROCCOUNT
+                    else:
+                        count = DEFAULTPROCCOUNT
+
                 if dty == 102:  # SQLT_CUR
                     dty = 'SQLT_RSET'
                     l = 4   # Was 38 ?  harumph
@@ -1222,7 +1234,7 @@
                     argconvert[i] = 2
 
                 #print "Creating new BindingArray of size %s, type %s" % (l, dty)
-                ba = cursor._connection.BindingArray(1, l, dty)
+                ba = cursor._connection.BindingArray(count, l, dty)
                 olda = a[0]
                 a[0] = ba  # Swap in our new binding array for the output