168 Commits

Author SHA1 Message Date
Alex Henrie
ca363bed8f
Use return value of snprintf instead of calling strlen unnecessarily (#420)
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
2020-04-18 16:55:29 -06:00
Alex Henrie
5ad2408a11
Consolidate string handling in cxoTransform_toPython (#419)
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
2020-04-17 09:57:26 -06:00
Anthony Tuininga
c3561f3595 Eliminate treating BLOB and BFILE as BINARY and CLOB and NCLOB as STRING as
they return an object which does not behave the same way as strings and bytes
(https://github.com/oracle/python-cx_Oracle/issues/415).
2020-04-13 09:21:57 -06:00
Anthony Tuininga
8a301721fb Ensure that the new DbType objects are hashable
(https://github.com/oracle/python-cx_Oracle/issues/401).
2020-02-21 15:39:32 -07:00
Anthony Tuininga
4ffbc9cac8 Added support for specifying the fetch array size when fetching documents from
a SODA collection -- available in Oracle Client 19.5 and higher.
2020-02-14 10:33:07 -07:00
Anthony Tuininga
9beb4aa907 Added support for SODA collection truncate, available in Oracle Client 20 and
higher.
2020-02-14 10:31:08 -07:00
Anthony Tuininga
44be257534 Add support for saving SODA documents into a collection, available in Oracle
Client 20 and higher.
2020-02-14 10:29:07 -07: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
08346005a7 Use named field structure initialization in order to clarify code and reduce
clutter.
2020-02-10 09:57:30 -07:00
Anthony Tuininga
809ead0b9c Added support for starting up a database using a parameter file (PFILE), as
requested (https://github.com/oracle/python-cx_Oracle/issues/295).
2019-12-04 15:07:38 -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
22642e2826 Older versions of Python 2.7 don't have PyMem_Calloc() so use PyMem_Malloc()
and memset() instead for Python 2.7.
2019-11-29 15:20:42 -07:00
Anthony Tuininga
79902e11e4 Added support for returning the rowid of the last row modified by an operation
on a cursor (or None if no row was modified).
2019-11-29 14:59:56 -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
2b1bb5c115 Eliminate reference leak when message properties object is destroyed. 2019-11-25 21:43:45 -07:00
Anthony Tuininga
0503265184 Add ORA-40479: internal JSON serializer error to the list of exceptions that
result in cx_Oracle.IntegrityError.
2019-11-25 21:41:32 -07:00
Anthony Tuininga
6f12ea7363 Eliminate reference leak when splitting the password and dsn components out of
a full connect string.
2019-11-20 14:34:11 -07:00
Anthony Tuininga
c447368230 Eliminate reference leak and ensure that memory is properly initialized in case
of error when using sharding keys.
2019-11-20 14:33:37 -07:00
Anthony Tuininga
3b306187b0 Added support for client initiated connections for subscriptions. 2019-11-13 16:51:23 -07:00
Anthony Tuininga
089639c0f9 A value of T_BOOL must be represented as char and should be treated as such
consistently in order to avoid issues on big-endian architectures.
2019-11-13 16:48:20 -07:00
Anthony Tuininga
495541ca20 Add support for setting maxSessionsPerShard attribute for session pools. 2019-11-13 16:47:09 -07:00
Anthony Tuininga
9cb9842696 Eliminate unnecessary check (ODPI-C performs this check already). 2019-11-13 16:45:55 -07:00
Anthony Tuininga
9b7137fb20 Update ODPI-C and simplify call to get server version. 2019-10-11 15:53:20 -06:00
Anthony Tuininga
a16a944964 Restore support for setting numeric bind variables with boolean values. 2019-08-22 21:39:15 -06:00
Anthony Tuininga
d526de1893 Resolve MemoryError exception on Windows when using an output type handler
(https://github.com/oracle/python-cx_Oracle/issues/330).
2019-07-15 14:23:48 -06:00
Anthony Tuininga
e6a825db27 Adjusted documentation to follow new API. 2019-06-19 16:02:34 -06:00
Anthony Tuininga
5f8d24dd24 Eliminated deprecation of attribute "id" on subscriptions. It is now populated
with the value of REGID found in the database view
USER_CHANGE_NOTIFICATION_REGS or the value of REG_ID found in the database
view USER_SUBSCR_REGISTRATIONS. For AQ subscriptions, the value is 0.
2019-06-19 16:01:57 -06:00
Anthony Tuininga
ae6164fc58 Change name of parameter to match documentation. 2019-06-19 16:01:06 -06:00
Anthony Tuininga
e38b4af987 Release the Python GIL while enqueuing and dequeuing messages! 2019-06-19 16:00:42 -06:00
Anthony Tuininga
df56c7f17f Enable PY_SSIZE_T_CLEAN in order to avoid deprecation warning and/or segfault
under Python 3.8.0b1 (https://github.com/oracle/python-cx_Oracle/issues/317).
2019-06-17 16:17:18 -06:00
Anthony Tuininga
d4498cf9e0 Added support for Advanced Queueing RAW queues and bulk enqueue/dequeue. 2019-05-03 13:21:39 -06:00
Anthony Tuininga
04a7dec0d4 Added mode cx_Oracle.DEFAULT_AUTH as requested
(https://github.com/oracle/python-cx_Oracle/issues/293) and adjusted
documentation for other cases that specified None where None is not actually
a valid value.
2019-04-29 15:24:56 -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
ce511e2fb7 Raise an exception when an error takes place
(https://github.com/oracle/python-cx_Oracle/issues/299).
2019-04-29 11:40:48 -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
e567eb3a58 Added support for SODA bulk insert available in Oracle Client 18.5 and higher. 2019-03-21 14:59:14 -06:00
Anthony Tuininga
c1e1659a14 Enable cursor.setinputsizes() and cursor.callfunc() to support specifying an
object type where a type is required, not just when a variable is being
created.
2019-03-12 16:42:02 -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
8789c6d2a0 Eliminate memory leak for subscriptions. 2019-03-08 09:57:14 -07:00
Anthony Tuininga
c675d4e827 Eliminated memory leak introduced by session tagging changes. 2019-01-24 13:45:16 -07:00
Anthony Tuininga
4097a37ff2 Bump copyright notice into 2019 for changed files. 2019-01-22 16:00:29 -07:00
Anthony Tuininga
ed88224241 Added support for a session callback (written in either PL/SQL or Python)
which will be called when the actual tag assigned to a session doesn't match
the tag requested.
2019-01-22 14:25:33 -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
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
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