Skip to content

Commit 25f5d47

Browse files
Fixed bug in determining the list of attributes for PL/SQL collections.
1 parent 375c151 commit 25f5d47

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

doc/src/release_notes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Thin Mode Changes
2828
#) Fixed bug when using DRCP with :ref:`asyncio <asyncio>`.
2929
#) Fixed bug in identifying bind variables in SQL statements containing a
3030
single line comment at the end of the statement.
31+
#) Fixed bug in determining the list of attributes for PL/SQL collections.
3132

3233
Thick Mode Changes
3334
++++++++++++++++++

src/oracledb/impl/thin/dbobject_cache.pyx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,8 @@ cdef class BaseThinDbObjectTypeCache:
356356
attr_type_owner, attr_type_package, attr_type_oid, \
357357
attr_instantiable, attr_super_type_owner, \
358358
attr_super_type_name in attrs:
359+
if attr_name is None:
360+
continue
359361
attr_impl = ThinDbObjectAttrImpl.__new__(ThinDbObjectAttrImpl)
360362
attr_impl.name = attr_name
361363
if attr_type_owner is not None:

tests/test_2300_object_var.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,8 @@ def test_2316(self):
553553
self.assertEqual(typ.element_type.schema, user.upper())
554554
self.assertEqual(typ.element_type.name, "UDT_SUBOBJECT")
555555
self.assertIsNone(typ.element_type.package_name)
556+
self.assertEqual(typ.attributes, [])
557+
self.assertTrue(typ.iscollection)
556558

557559
def test_2317(self):
558560
"2317 - test the metadata of a PL/SQL type"
@@ -562,6 +564,8 @@ def test_2317(self):
562564
self.assertEqual(typ.name, "UDT_STRINGLIST")
563565
self.assertEqual(typ.package_name, "PKG_TESTSTRINGARRAYS")
564566
self.assertEqual(typ.element_type, oracledb.DB_TYPE_VARCHAR)
567+
self.assertEqual(typ.attributes, [])
568+
self.assertTrue(typ.iscollection)
565569

566570
def test_2318(self):
567571
"2318 - test creating an object variable without a type name"

0 commit comments

Comments
 (0)