39 Commits

Author SHA1 Message Date
Anthony Tuininga
f7b7785e82 Reworked type management to clarify and simplify code (see release notes for
details).
2020-02-10 10:02:03 -07:00
Anthony Tuininga
e37e502724 Added test cases, particularly for bulk AQ operations. 2019-07-05 14:32:59 -06:00
Anthony Tuininga
f324757909 Adjust formatting of PR #287. 2019-03-28 11:57:33 -06:00
Andrey Petukhov
a654befddf Cursor.callproc method changed with respect to doc (#287)
Signed-off-by: Andrey Petukhov <APetukhov@bellintegrator.com>
2019-03-28 10:55:30 -07:00
Anthony Tuininga
4ed95aad94 Reworked test suite to eliminate the use of default passwords and to make the
individual test modules directly runnable (instead of using execfile() within
test.py).
2019-01-31 10:18:04 -07:00
Anthony Tuininga
4097a37ff2 Bump copyright notice into 2019 for changed files. 2019-01-22 16:00:29 -07:00
Anthony Tuininga
43a485042f Add additional check for calling setinputsizes() with an empty dictionary in
order to avoid the error "cx_Oracle.ProgrammingError: positional and named
binds cannot be intermixed"
(https://github.com/oracle/python-cx_Oracle/issues/199).
2019-01-08 14:41:01 -07:00
Anthony Tuininga
b340771c37 Rework handling of numbers so that, unless using the NATIVE_INT,
NATIVE_FLOAT or NATIVE_DOUBLE types, all numbers are converted to strings and
passed through to ODPI-C in all Python versions; improved error message when
a value cannot be represented by an Oracle number value; improved test suite to
verify that calling executemany() with integers, floats and decimal values
intermixed with each other works as expected
(https://github.com/oracle/python-cx_Oracle/issues/241).
2018-12-07 19:16:33 -07:00
Anthony Tuininga
4c12b47573 Update ODPI-C to support fetching XMLType as strings
(https://github.com/oracle/python-cx_Oracle/issues/14).
2018-12-03 10:20:14 -07:00
Anthony Tuininga
ef036cbefc Ensure that all references to TestTempTable use the column names instead of
assuming the number of columns (in preparation for adding additional nullable
columns for other tests).
2018-12-03 10:19:22 -07:00
Anthony Tuininga
00de5ea10f Handle case when first call to cursor.executemany() has one or more columns
that are always null and a subsequent call to cursor.executemany() has a value
other than None in the same column
(https://github.com/oracle/python-cx_Oracle/issues/236).
2018-11-29 17:19:39 -07:00
Anthony Tuininga
e4cef63804 Add comment which is displayed during the test run. 2018-11-29 17:19:20 -07:00
Anthony Tuininga
548440016e Add support for passing an object type (such as those created by the method
connection.gettype()) as the first parameter to cursor.var(), as requested
(https://github.com/oracle/python-cx_Oracle/issues/231).
2018-10-30 16:32:05 -06:00
Anthony Tuininga
4fd6c35436 Allow the type name to be None, as requested
(https://github.com/oracle/python-cx_Oracle/issues/231).
2018-10-30 16:31:47 -06:00
Anthony Tuininga
bc69e784f8 Adjust copyright notices to match requirements of Oracle Legal. 2018-09-10 11:39:51 -06:00
Anthony Tuininga
fee92abe5a If cursor.setinputsizes() is called without any parameters, do not set the flag
indicating that bind variables should be returned since otherwise binding with
named arguments will raise the error "cx_Oracle.ProgrammingError: positional
and named binds cannot be intermixed"
(https://github.com/oracle/python-cx_Oracle/issues/199).
2018-07-03 13:36:10 -06:00
Anthony Tuininga
fb249f5944 Ensure that the row count for queries is reset to zero when the statement is
executed (https://github.com/oracle/python-cx_Oracle/issues/193).
2018-06-25 15:57:19 -06:00
Anthony Tuininga
a8751e91f4 Added support for using the cursor as a context manager
(https://github.com/oracle/python-cx_Oracle/issues/190).
2018-06-21 11:29:11 -06:00
Anthony Tuininga
8cc7b893f2 Ensure that binding a boolean value outside of PL/SQL simply binds the integer
0 or 1 (https://github.com/oracle/python-cx_Oracle/issues/181).
2018-05-19 21:35:37 -06:00
Anthony Tuininga
005a00c03d Added additional test cases and corrected test case for ltxid when
using 11.2 client.
2018-05-09 19:36:13 -06:00
Anthony Tuininga
756442ee24 Added checks on passing invalid parameters to cursor.var(),
cursor.arrayvar(), cursor.callfunc() and cursor.setinputsizes().
2018-05-09 19:35:49 -06:00
Anthony Tuininga
2272af1563 Add support for specifying an integer for the parameters argument to
cursor.executemany(). This allows for batch execution when no parameters are
required or when parameters have previously been bound. This replaces
cursor.executemanyprepared() which is now deprecated and will be removed in
cx_Oracle 7.
2018-05-09 19:35:00 -06:00
Anthony Tuininga
ef60884570 Additional test cases to improve code coverage. 2018-01-11 16:24:08 -07:00
Anthony Tuininga
3d8b74e77f Ensure that a call to setinputsizes() with an invalid type prior to a call to
executemany() does not result in a type error, but instead gracefully ignores
the call to setinputsizes() as required by the DB API
(https://github.com/oracle/python-cx_Oracle/issues/75).
2017-09-01 16:21:28 -06:00
Anthony Tuininga
8cc4d8607f Remove unnecessary Unicode specific tests for Python 2.7 since Python 3 now
also supports the "u" prefix; merge them instead into the main tests.
2017-07-21 15:16:24 -06:00
Anthony Tuininga
52e1960bfb Correct determination of the names of the bind variables in prepared SQL
tatements (which behaves a little differently from PL/SQL statements).
2017-05-19 21:47:46 -06:00
Anthony Tuininga
c946e86384 Correct support for executemany() when strings that are found later in the
array are larger than strings found earlier in the array.
2017-04-26 17:11:58 -06:00
Anthony Tuininga
b614a47ef2 Added copyright notices to the top of all tests and samples as requested. 2017-03-09 10:21:22 -07:00
Anthony Tuininga
73f61d8a07 Raise cx_Oracle.DatabaseError, not IndexError for a scroll operation that
would position the cursor outside of the result set.
2017-02-03 09:01:47 -07:00
Anthony Tuininga
8fda704186 Adjusted test cases to make use of encoding and nencoding parameters to both
standalone connection and session pool creation; added test cases for binding
and fetching supplemental characters as well as fetching temporary LOBs; tidied
up a few test cases as well.
2017-01-13 18:14:45 -07:00
Anthony Tuininga
ab42359f26 Fix cursor.scroll() to calculate row count correctly in all situations and
add test cases to verify that it does in fact work.
2017-01-12 15:22:29 -07:00
Anthony Tuininga
0e50be2a08 Renamed table TestExecuteMany to TestTempTable to be more in keeping with its
actual uses (not just testing executemany()).
2017-01-12 15:20:44 -07:00
Anthony Tuininga
cd9fced3e6 Remove deprecated variable attributes maxlength and allocelems. 2016-02-09 17:11:06 -07:00
Anthony Tuininga
3eeff96403 Added support for scrollable cursors. 2016-02-05 17:19:40 -07:00
Anthony Tuininga
2ba419ebd6 Updated test cases to use the correct names for the various assertions instead
of the deprecated names.
2016-01-21 09:59:03 -07:00
Anthony Tuininga
faadbe4730 Remove code specific to strings being 4000 characters now that Oracle 12c has
the ability to have strings up to 32k characters. This implies that using
setinputsizes() is necessary if a long string type is desired as this will not
occur automatically when the string exceeds 4000 characters. Tests are tidied
up to remove the "p_" prefix from all bind variables.
2014-09-04 22:33:08 -06:00
Anthony Tuininga
c6603b324d Add new attributes size, bufferSize and numElements to variable objects,
deprecating allocelems (replaced by numElements) and maxlength (replaced by
bufferSize); avoid increasing memory allocation for strings when using variable
width character sets and increasing the number of elements in a variable during
executemany(). Thanks to Don Reid for pointing out this issue.
2009-01-06 20:58:34 +00:00
Anthony Tuininga
8854fdde7d Set up test cases for Python 3.x. 2008-10-17 03:51:38 +00:00
Anthony Tuininga
104e11b67a Last public release from Computronix. 2007-06-13 21:15:16 +00:00