You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ODPI-C doesn't seem to support Oracle object subtype properly.
Consider the table created by the following statements.
createtypetest_inheritance_baseas object (
name varchar2(30)
) not final
/createtypetest_inheritance_sub under test_inheritance_base (
surname varchar2(30)
)
/createtabletest_inheritance (id integer, name test_inheritance_base);
insert into test_inheritance values (1, test_inheritance_base('John'));
insert into test_inheritance values (2, test_inheritance_sub('John', 'Smith'));
commit;
When the name column where id = 1 is fetched, its type is same with the type information retrieved by dpiStmt_getQueryInfo.
But when the name column where id = 2 is fetched, there is no way to know its actual type.
IMO, the problem will be fixed if dpiObject_getObjectType(), which internally uses OCIObjectGetTypeRef and OCIDescribeAny with OCI_OTYPE_REF, is added.
It may be better to add isFinalType member to dpiObjectTypeInfo to check whether the type is a final type. When a column in a query is a final type, there is no need to call dpiObject_getObjectType() for each fetched value. When it isn't a final type, dpiObject_getObjectType() must be called for each value.
The text was updated successfully, but these errors were encountered:
ODPI-C doesn't seem to support Oracle object subtype properly.
Consider the table created by the following statements.
When the name column where id = 1 is fetched, its type is same with the type information retrieved by dpiStmt_getQueryInfo.
But when the name column where id = 2 is fetched, there is no way to know its actual type.
IMO, the problem will be fixed if dpiObject_getObjectType(), which internally uses OCIObjectGetTypeRef and OCIDescribeAny with OCI_OTYPE_REF, is added.
It may be better to add isFinalType member to dpiObjectTypeInfo to check whether the type is a final type. When a column in a query is a final type, there is no need to call dpiObject_getObjectType() for each fetched value. When it isn't a final type, dpiObject_getObjectType() must be called for each value.
The text was updated successfully, but these errors were encountered: