87 Commits

Author SHA1 Message Date
Anthony Tuininga
1fd7940494 Ensure that error ORA-24816: Expanded non LONG bind data supplied after actual
LONG or LOB column" is not raised by ensuring an empty string does not use a
size of zero (which triggers this situation in Oracle 12.1).
2018-03-05 13:37:32 -07:00
Anthony Tuininga
e08e23bb93 Eliminate memory leak when extending a collection. 2018-03-02 13:17:21 -07:00
Anthony Tuininga
1bd8e95807 Added support for closing the connection when reaching the end of a code block
controlled by the connection as a context manager, but in a backwards
compatible way (https://github.com/oracle/python-cx_Oracle/issues/113).
2018-02-27 16:58:01 -07:00
Anthony Tuininga
ebfc8d4f9c Use new naming standard in top-level module code as well. 2018-02-27 16:57:31 -07:00
Anthony Tuininga
46e3aff3fa Ensure that the number of elements in the array is not lost when the buffer
size is increased to accommodate larger strings.
2018-02-16 16:23:09 -07:00
Anthony Tuininga
9b1ce308b1 Added support for creating a temporary LOB directly. 2018-02-16 16:21:32 -07:00
Anthony Tuininga
d9cf469167 Correct binding of LOB values. 2018-02-16 16:20:50 -07:00
Anthony Tuininga
0d3aa46d02 Simplify code. 2018-02-16 16:20:29 -07:00
Anthony Tuininga
6e3b578281 Eliminate reference leak with LOB values acquired from attributes of objects or
elements of collections.
2018-02-02 15:45:21 -07:00
Anthony Tuininga
99c019d6c5 Restore support for binding a date value to datetime variable. 2018-02-02 15:44:45 -07:00
Anthony Tuininga
5171ede9c2 Correct handling of Oracle objects after consolidation of transformations
to/from Python objects.
2018-02-02 15:42:57 -07:00
Anthony Tuininga
e5b6370bd0 Reorganize code to implement the following:
- use a prefix of cxo/CXO for all variables, methods and constants
  - create common include file and use separate compilation units
  - consolidate all transformations to/from Python objects
2018-01-29 18:50:18 -07:00
Anthony Tuininga
fa43311bbc Update ODPI-C; remove error "DPI-1054: connection cannot be closed when open
statements or LOBs exist"
(https://github.com/oracle/python-cx_Oracle/issues/138).
2018-01-26 21:18:16 -07:00
Anthony Tuininga
18b014a19e Correct support in Python 3.x for cursor.parse(). 2018-01-11 14:20:51 -07:00
Anthony Tuininga
8dfd842cfd Revert last change (restriction is deliberate). 2017-12-15 09:00:56 -07:00
Anthony Tuininga
cf19bc7f74 Remove unnecessary type checks since PyFloat_AsDouble() will convert the value
to floating point if possible anyway, and if not, will raise an appropriate
exception.
2017-12-15 08:49:27 -07:00
Anthony Tuininga
9ae0f5dd1c Use the correct designation for the external handle parameter. 2017-12-11 15:41:48 -07:00
Anthony Tuininga
5d728693ca Eliminate compiler warnings on 32-bit Windows. 2017-12-07 15:56:26 -07:00
Anthony Tuininga
864780da2a Use long long instead of just long in order to avoid truncation on Windows
where sizeof(long) != sizeof(void*).
2017-12-07 15:55:46 -07:00
Anthony Tuininga
681c18675e Update ODPI-C (adjust OCI prefetch; added options for authentication with
SYSBACKUP, SYSDG, SYSKM and SYSRAC, as requested
(https://github.com/oracle/python-cx_Oracle/issues/101).
2017-11-27 10:40:19 -07:00
Anthony Tuininga
5625a320c9 Correct reference handling when an invalid keyword parameter is passed to the
cx_Oracle.SessionPool constructor.
2017-11-17 21:39:26 -07:00
Anthony Tuininga
f26fb5157e Ensure that the edition is passed through to ODPI-C when a session pool is
created.
2017-11-17 13:41:49 -07:00
Anthony Tuininga
cb07970d2f Remove unnecessary lines. 2017-11-16 09:43:31 -07:00
Anthony Tuininga
ed7bd281f2
Merge pull request #54 from vnaydionov/pypy-pip-install
Fix build with PyPy 5.9.0-alpha0 in libpython mode
2017-11-16 08:42:24 -08:00
Anthony Tuininga
c122690ac4 Add support for identifying the id of the transaction which spawned the
message, as requested (https://github.com/oracle/odpi/issues/32).
2017-11-08 10:18:18 -08:00
Anthony Tuininga
9bdc5cb5d6 Check variable array size when setting variable values and raise IndexError, as
is already done for getting variable values.
2017-11-03 21:31:02 -06:00
Anthony Tuininga
22b6de785a Update ODPI-C (correct handling of NVARCHAR2 object attributes and collection
elements).
2017-11-03 21:30:27 -06:00
Anthony Tuininga
86564b9df3 Update ODPI-C (replace usage of OCI thread key with thread-safe handle pool). 2017-10-24 22:05:20 -06:00
Anthony Tuininga
bc1f53f213 Use dpiData_setTimestamp() instead of setting the values directly. 2017-10-24 22:03:06 -06:00
Anthony Tuininga
7fc5127aaa Added support for connecting to specific shards of a sharded database by
specifying a shard key.
2017-09-12 13:29:47 -06:00
Anthony Tuininga
0648181afd Correct typo. 2017-09-12 13:27:30 -06: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
7b484bce70 Eliminate segfault when attempting to reuse a REF cursor that has been closed. 2017-08-30 11:54:33 -06:00
Anthony Tuininga
0111431430 Update ODPI-C (improve performance, correct handling of objects when dynamic
binding is being used).
2017-08-24 21:50:29 -06:00
Anthony Tuininga
c2c8d541bf On Windows, sizeof(long) = 4 which means that integers between 10 and 18 digits
were not converted to Python correctly
(https://github.com/oracle/python-cx_Oracle/issues/70).
2017-08-22 21:40:21 -06:00
Anthony Tuininga
a48fcdfde2 Ensure that fetch indicators are reset, even if the fetch variables themselves
do not need to be created.
2017-08-22 11:51:58 -06:00
Anthony Tuininga
5837e71cd8 Eliminate memory leak when repeatedly executing the same query. 2017-08-21 16:10:11 -06:00
Viacheslav Naydenov
d43b3eee70 Fix build with PyPy 5.9.0-alpha0 in libpython mode
Signed-off-by: Viacheslav Naydenov <vaclav@yandex.ru>
2017-08-21 22:46:21 +03:00
Anthony Tuininga
7b6276f5eb Added missing type check to prevent coercion of decimal to float
(https://github.com/oracle/python-cx_Oracle/issues/68).
2017-08-18 14:15:50 -06:00
Anthony Tuininga
90f571c660 Update ODPI-C to 2.0.1. 2017-08-18 10:59:33 -06:00
Anthony Tuininga
f1f5ead2a4 Update ODPI-C. 2017-08-11 11:13:05 -06:00
Anthony Tuininga
ece92442ab Delay initialization of the ODPI-C library until the first standalone
connection or session pool is created so that manipulation of the environment
variable NLS_LANG can be performed after the module has been imported
(https://github.com/oracle/python-cx_Oracle/issues/36); this also has the added
benefit of reducing the number of errors that can take place when the module is
imported.
2017-07-31 21:21:32 -06:00
Anthony Tuininga
1f917aafbb In certain cases where non-long values follow LOB values in the list of bind
variables, the error "ORA-24816: Expanded non LONG bind data supplied after
actual LONG or LOB column" is raised; this occurs if the length of the supplied
value, when expanded, might exceed 4000 bytes
(https://github.com/oracle/python-cx_Oracle/issues/50).
2017-07-25 12:16:54 -06:00
Anthony Tuininga
852aed3b58 Ensure that the array position passed to var.getvalue() does not exceed the
number of elements allocated in the array!
2017-07-21 15:36:31 -06:00
Anthony Tuininga
1eba9d55be Use dpiData_*() functions to simplify setting data; correct handling of
timestamp with time zone attributes.
2017-07-21 15:35:49 -06:00
Anthony Tuininga
df102db935 Correct handling of CLOB/NCLOB when using different encodings. 2017-07-21 15:34:48 -06:00
Anthony Tuininga
628d1717f5 Corrected support for binding boolean values with Oracle client 11.2. 2017-07-14 11:31:59 -06:00
Anthony Tuininga
49b0afd7a5 Ensure the correct encoding is used for setting variable values. 2017-07-07 07:38:44 -07:00
Anthony Tuininga
18e06bf14a Corrected support for binding decimal values in object attribute values and
collection element values.
2017-07-07 07:38:15 -07:00
Anthony Tuininga
4a1641e9c4 Define exception classes on the connection object to simplify error handling in
multi-connection environments, as specified in the Python DB API.
2017-07-05 13:18:29 -06:00