205 Commits

Author SHA1 Message Date
Anthony Tuininga
d242bc716d Rework build to use setuptools exclusively and enable use of pyproject.toml;
rework test suite to use tox and simplify test suite (also added a test number
to each test case for easier reference).
2020-11-02 15:21:52 -07:00
Anthony Tuininga
2194d81965 Added test cases for prefetch. 2020-11-02 15:20:45 -07:00
Anthony Tuininga
10e5c258fe Update to ODPI-C 4.0.1 and add test to ensure that the offset is returned
correctly when a parse error is encountered.
2020-06-26 10:33:13 -06:00
Anthony Tuininga
c144216b95 Adjust test name to remove reference to very old version of Python. 2020-06-03 09:12:45 -06:00
Anthony Tuininga
c7a23115ad Remove remaining references to Python 2 syntax. 2020-06-03 09:11:03 -06:00
Anthony Tuininga
d5144aa58f Added test cases for cursor.lastrowid and SODA collection truncation (and added
code to check for situation where SODA support is lacking and stop running the
test suite for SODA in that case).
2020-05-18 16:34:58 -06:00
Alex Henrie
ba141dd799
Create TestLongs and TestLongRaws tables without compression (#437)
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
2020-05-18 13:43:13 -06:00
Anthony Tuininga
856d0aab76 Tweaks to boolean variable improvements patch supplied by Alex Henrie
(https://github.com/oracle/python-cx_Oracle/pull/435).
2020-05-15 21:47:40 -06:00
Alex Henrie
17fd92f8f6
Convert Python objects to booleans based on their Python truth value (#435)
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
2020-05-15 17:00:13 -06:00
Anthony Tuininga
fbe929d5c8 The database types CLOB, NCLOB, BFILE and BLOB no longer compare equal to
STRING and BINARY.
2020-04-17 10:19:44 -06:00
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
e85a03b57b Remove commented out code 2020-01-06 20:14:11 -07:00
Anthony Tuininga
6b73d2223f cx_Oracle 8 when it is released will not support Python 2.7. 2019-12-04 15:06:25 -07:00
Anthony Tuininga
5f70edd71c Be consistent and always raise cx_Oracle.InterfaceError when a connection is
closed and unusable.
2019-11-29 14:58:47 -07:00
Anthony Tuininga
7b144440aa Ensure that the session time zone is UTC so that values can be compared without
concern for the time zones of the client and database server.
2019-11-25 21:41:58 -07:00
Anthony Tuininga
80b9a31fa6 Remove invalid test. 2019-11-13 16:48:06 -07:00
Anthony Tuininga
fcbf9ff17c DatabaseError, not ProgrammingError is now returned as this check is performed
at the ODPI-C level.
2019-11-13 16:47:45 -07:00
Anthony Tuininga
a7b958d68a Added test cases for pls_integer and binary_integer data types. 2019-11-13 16:44:50 -07:00
Anthony Tuininga
cd9c7e3fa3 Adjust test suite so that it runs unchanged against Oracle Cloud databases:
- administrative user is ADMIN on the Oracle Cloud databases and SYSTEM on
  local databases (SYSDBA is not available on the Oracle Cloud database)
- environment variables CX_ORACLE_TEST_SYSDBA_USER and
  CX_ORACLE_TEST_SYSDBA_PASSWORD are replaced with CX_ORACLE_TEST_ADMIN_USER
  and CX_ORACLE_TEST_ADMIN_PASSWORD
- skip tests that change passwords as passwords on Oracle Cloud database are
  strictly controlled
- skip tests that check subscriptions as these are not currently supported on
  Oracle Cloud database
2019-11-13 16:43:49 -07:00
Anthony Tuininga
a16a944964 Restore support for setting numeric bind variables with boolean values. 2019-08-22 21:39:15 -06:00
Anthony Tuininga
2cec047870 Update to new default PDB service name. 2019-08-08 14:19:23 -06:00
Anthony Tuininga
e37e502724 Added test cases, particularly for bulk AQ operations. 2019-07-05 14:32:59 -06:00
Anthony Tuininga
ee5fe39544 Rename queues and queue tables to be more clear as to which is which. 2019-06-11 19:13:21 -06:00
Anthony Tuininga
82097891b3 Add support for setting a CLOB attribute on a SQL object, as requested
(https://github.com/oracle/python-cx_Oracle/issues/299).
2019-04-29 11:41:28 -06:00
Anthony Tuininga
8681366f53 For Python 2.7, raw_input is needed to request input; also ensure that
sample parameters are saved once requested.
2019-03-29 09:49:40 -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
3af5e46b4b Correct parsing of connect string so that the last @ symbol is searched for
instead of the first @ symbol; otherwise, passwords containing an @ symbol will
result in the incorrect DSN being extracted
(https://github.com/oracle/python-cx_Oracle/issues/290).
2019-03-28 10:46:15 -06:00
Anthony Tuininga
c112af35cb Revert changes to return decimal numbers when the numeric precision was too
great to be returned accurately as a floating point number. This change had too
great an impact on existing functionality and an output type handler can be
used to return decimal numbers where that is desirable
(https://github.com/oracle/python-cx_Oracle/issues/279).
2019-03-12 09:31:38 -06:00
Anthony Tuininga
0ae5b9e715 Added test cases for session tagging. 2019-03-07 17:00:14 -07:00
Anthony Tuininga
fb445815f2 Use random password instead of hard coded password as a security measure. 2019-01-31 10:18:43 -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
ba0d41412f Added test cases for inserting and fetching XMLType objects as strings. 2019-01-22 14:28:25 -07:00
Anthony Tuininga
b13c998999 Timed waits for acquiring a session from a session pool is only available in
Oracle 12.2 and higher.
2019-01-22 14:22:39 -07:00
Anthony Tuininga
1860fdb05b Ensure that values that exceed sizeof(long) for Python 2 on Windows when using
the Oracle type NATIVE_INT are not silently truncated
(https://github.com/oracle/python-cx_Oracle/issues/257).
2019-01-21 20:49:08 -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
8fbc43ac08 Added additional SODA test cases. 2018-11-29 17:21:36 -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
1be0461174 Be clearer about the syntax used for connecting to the database as sys. 2018-11-05 09:53:39 -07:00
Anthony Tuininga
ae8b4f84aa Entries can remain in v$sql_monitor for a period of time so only look at the
executing one.
2018-11-02 15:45:09 -06:00
Anthony Tuininga
851c9a4650 Add support for getting/setting raw attributes of objects, as requested
(https://github.com/oracle/odpi/issues/72).
2018-11-02 15:44:49 -06: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
74d9d71484 Use cx_Oracle.connect() in preference to cx_Oracle.Connection() in samples and
tests. Although the two are aliases of one another, it makes sense to be
consistent and to use the one that the DB API prefers as well.
2018-09-21 11:05:40 -06:00
Anthony Tuininga
bc69e784f8 Adjust copyright notices to match requirements of Oracle Legal. 2018-09-10 11:39:51 -06:00