Update ODPI-C (improve performance, correct handling of objects when dynamic
binding is being used).
This commit is contained in:
parent
c2c8d541bf
commit
0111431430
|
@ -40,9 +40,9 @@ author = 'Oracle'
|
||||||
# other places throughout the built documents.
|
# other places throughout the built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '6.0'
|
version = '6.1'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '6.0.1'
|
release = '6.1.0-dev'
|
||||||
|
|
||||||
# There are two options for replacing |today|: either, you set today to some
|
# There are two options for replacing |today|: either, you set today to some
|
||||||
# non-false value, then it is used:
|
# non-false value, then it is used:
|
||||||
|
|
2
odpi
2
odpi
|
@ -1 +1 @@
|
||||||
Subproject commit dfa763c343a64e85c60bda1cae93af35e9967b9d
|
Subproject commit 5967b3ad0d0d7dc63cf8ffb1974e4bc3e2356610
|
23
setup.py
23
setup.py
|
@ -20,7 +20,7 @@ except:
|
||||||
from distutils.extension import Extension
|
from distutils.extension import Extension
|
||||||
|
|
||||||
# define build constants
|
# define build constants
|
||||||
BUILD_VERSION = "6.0.2"
|
BUILD_VERSION = "6.1.0-dev"
|
||||||
|
|
||||||
# setup extra link and compile args
|
# setup extra link and compile args
|
||||||
extraLinkArgs = []
|
extraLinkArgs = []
|
||||||
|
@ -82,16 +82,17 @@ extension = Extension(
|
||||||
"src/SessionPool.c", "src/StringVar.c", "src/Subscription.c",
|
"src/SessionPool.c", "src/StringVar.c", "src/Subscription.c",
|
||||||
"src/Variable.c", "odpi/include/dpi.h", "odpi/src/dpiImpl.h",
|
"src/Variable.c", "odpi/include/dpi.h", "odpi/src/dpiImpl.h",
|
||||||
"odpi/src/dpiConn.c", "odpi/src/dpiContext.c",
|
"odpi/src/dpiConn.c", "odpi/src/dpiContext.c",
|
||||||
"odpi/src/dpiData.c", "odpi/src/dpiDeqOptions.c",
|
"odpi/src/dpiData.c", "odpi/src/dpiDebug.c",
|
||||||
"odpi/src/dpiEnqOptions.c", "odpi/src/dpiEnv.c",
|
"odpi/src/dpiDeqOptions.c", "odpi/src/dpiEnqOptions.c",
|
||||||
"odpi/src/dpiError.c", "odpi/src/dpiGen.c",
|
"odpi/src/dpiEnv.c", "odpi/src/dpiError.c",
|
||||||
"odpi/src/dpiGlobal.c", "odpi/src/dpiLob.c",
|
"odpi/src/dpiGen.c", "odpi/src/dpiGlobal.c",
|
||||||
"odpi/src/dpiMsgProps.c", "odpi/src/dpiObject.c",
|
"odpi/src/dpiLob.c", "odpi/src/dpiMsgProps.c",
|
||||||
"odpi/src/dpiObjectAttr.c", "odpi/src/dpiObjectType.c",
|
"odpi/src/dpiObject.c", "odpi/src/dpiObjectAttr.c",
|
||||||
"odpi/src/dpiOci.c", "odpi/src/dpiOracleType.c",
|
"odpi/src/dpiObjectType.c", "odpi/src/dpiOci.c",
|
||||||
"odpi/src/dpiPool.c", "odpi/src/dpiRowid.c",
|
"odpi/src/dpiOracleType.c", "odpi/src/dpiPool.c",
|
||||||
"odpi/src/dpiStmt.c", "odpi/src/dpiSubscr.c",
|
"odpi/src/dpiRowid.c", "odpi/src/dpiStmt.c",
|
||||||
"odpi/src/dpiUtils.c", "odpi/src/dpiVar.c"])
|
"odpi/src/dpiSubscr.c", "odpi/src/dpiUtils.c",
|
||||||
|
"odpi/src/dpiVar.c"])
|
||||||
|
|
||||||
# perform the setup
|
# perform the setup
|
||||||
setup(
|
setup(
|
||||||
|
|
|
@ -734,6 +734,7 @@ void initcx_Oracle(void)
|
||||||
#include "dpiConn.c"
|
#include "dpiConn.c"
|
||||||
#include "dpiContext.c"
|
#include "dpiContext.c"
|
||||||
#include "dpiData.c"
|
#include "dpiData.c"
|
||||||
|
#include "dpiDebug.c"
|
||||||
#include "dpiDeqOptions.c"
|
#include "dpiDeqOptions.c"
|
||||||
#include "dpiEnqOptions.c"
|
#include "dpiEnqOptions.c"
|
||||||
#include "dpiEnv.c"
|
#include "dpiEnv.c"
|
||||||
|
|
|
@ -102,3 +102,19 @@ class TestDMLReturning(BaseTestCase):
|
||||||
"The final value of string 10"
|
"The final value of string 10"
|
||||||
])
|
])
|
||||||
|
|
||||||
|
def testInsertAndReturnObject(self):
|
||||||
|
"test inserting an object with DML returning"
|
||||||
|
typeObj = self.connection.gettype("UDT_OBJECT")
|
||||||
|
stringValue = "The string that will be verified"
|
||||||
|
obj = typeObj.newobject()
|
||||||
|
obj.STRINGVALUE = stringValue
|
||||||
|
outVar = self.cursor.var(cx_Oracle.OBJECT, typename = "UDT_OBJECT")
|
||||||
|
self.cursor.execute("""
|
||||||
|
insert into TestObjects (IntCol, ObjectCol)
|
||||||
|
values (4, :obj)
|
||||||
|
returning ObjectCol into :outObj""",
|
||||||
|
obj = obj, outObj = outVar)
|
||||||
|
result = outVar.getvalue()
|
||||||
|
self.assertEqual(result.STRINGVALUE, stringValue)
|
||||||
|
self.connection.rollback()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue