56 Commits

Author SHA1 Message Date
Anthony Tuininga
f4a24f3930 Added support for PL/SQL collections of booleans (available only in 12.1). 2016-02-16 16:32:00 -07:00
Anthony Tuininga
cd9fced3e6 Remove deprecated variable attributes maxlength and allocelems. 2016-02-09 17:11:06 -07:00
Anthony Tuininga
cb3f833a63 Added support for binding objects and setting attributes on objects of numbers,
strings and dates.
2016-02-09 14:51:30 -07:00
Anthony Tuininga
4e1c26a3dc Eliminate unnecessary initialization code. 2016-02-08 10:32:11 -07:00
Anthony Tuininga
a3947fb244 Added support for binding native integers which has a slight performance
advantage.
2016-02-03 19:20:12 -07:00
Anthony Tuininga
c863777917 Added support for pickling/unpickling error objects; this addresses issue 23
(https://bitbucket.org/anthony_tuininga/cx_oracle/issues/23/cx_oracle_error-is-not-un-picklable)
2016-01-20 16:39:25 -07:00
Anthony Tuininga
8c1e6f68e4 Added support for binding boolean values to PL/SQL booleans -- a feature that
is only available in Oracle 12.1 and higher.
2016-01-14 21:41:36 -07:00
Anthony Tuininga
3c36e8cde3 Added support for NCHAR, FIXED_NCHAR and LONG_NCHAR, which are the same as the
types UNICODE, FIXED_UNICODE and LONG_UNICODE (now deprecated).
2015-06-06 21:01:37 -06:00
Anthony Tuininga
3d160bf54a Remove conditional statements looking for SQLT_BFLOAT since that was
introduced in 10g Release 1 and cx_Oracle does not support anything earlier
than that anyway!
2015-04-25 19:31:03 -06:00
Anthony Tuininga
98886fe3bc Correct execution of tests with Oracle 11g client. 2015-04-03 22:50:31 -06:00
Anthony Tuininga
85b6adeb6b Reorganize the code for handling errors so that the same code can be used for
managing batch errors as well as raising exceptions in the ordinary case.
2015-02-25 21:50:30 -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
b353be865a Booleans are subclassed to integer so ensure that the boolean is checked first;
this wasn't a problem in Python 2.x but has become one in Python 3.x.
2014-08-05 15:50:05 -06:00
Anthony Tuininga
d255b7457f Expose the UNICODE, FIXED_UNICODE and LONG_UNICODE types so that in Python 3
one can actually specify the use of the NCHAR type fields when binding or using
setinputsizes().
2014-07-07 12:41:37 -06:00
Anthony Tuininga
4838055084 Ensure that in Python 3 NCHAR and NVARCHAR2 and NCLOB columns are retrieved
properly without conversion issues. Thanks to Joakim Andersson for pointing
out the issue and the possible solution.
2014-05-16 22:33:35 -06:00
Anthony Tuininga
96a3468db6 Added suport for LONG_UNICODE which is a type that is used to handle long
unicode strings. These are not explicitly supported in Oracle but can be used
to bind to NCLOB, for example, without getting the "unimplemented or
unreasonable conversion requested" error.
2012-03-17 21:23:37 -06:00
Anthony Tuininga
04f1904a7d Remove "unicode" mode and simply permit unicode to be used everywhere within
cx_Oracle; stop using "unicode" mode in the OCI as well since that appears to
have bugs in some places and doesn't really solve any problems anyway.
2011-02-19 03:50:16 +00:00
Anthony Tuininga
9be85a356c Free temporary LOBs prior to each fetch in order to avoid leaking them; thanks
to Uwe Hoffmann for the initial patch.
2011-01-04 05:55:54 +00:00
Anthony Tuininga
b1b4c403fb Added support for creating an object variable via a named type -- the first
step on the road to adding full object support.
2010-07-31 05:32:30 +00:00
Anthony Tuininga
f3282b2ae2 Added check for attempts to call executemany() with arrays which are not
supported by the OCI; thanks to Amaury Forgeot d'Arc for the suggestion.
2009-11-20 05:42:57 +00:00
Anthony Tuininga
1ef0f27b70 Change order of assignment in order to make VC++ happier. 2009-09-28 15:51:41 +00:00
Anthony Tuininga
04a4428fee Add additional cast as requested by Marco de Paoli in order to support
compiling with Microsoft Visual C++ 2008.
2009-03-02 21:58:52 +00: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
607f9019d1 Call the type's tp_free and tp_alloc methods at all times in order to deal with
inheritance properly; use "self" at all times in the constructor and destructor
routines.
2009-01-06 15:46:54 +00:00
Anthony Tuininga
6e899f435e NCLOB variables need to be retained even in Unicode mode as Oracle will not
allow you to read/write those type of LOB values with SQLCS_IMPLICIT for
reasons known only to itself.
2008-12-16 21:47:56 +00:00
Anthony Tuininga
231377127e Added support for interval day to second in Oracle, represented as Python
datetime.timedelta objects.
2008-11-25 15:59:16 +00:00
Anthony Tuininga
699d1eef58 Reverse the comparison for character data or bad things can happen! 2008-10-17 04:06:29 +00:00
Anthony Tuininga
3e55613248 Replace all occurrences of PyInt_AS_LONG with PyInt_AsLong since Python 3.x
doesn't have a separate integer type.
2008-10-17 03:04:48 +00:00
Anthony Tuininga
c2fbe9a801 Further work toward supporting Python 3.x. 2008-10-16 21:37:08 +00:00
Anthony Tuininga
60cd74aed4 Use sb4 instead of int in order to handle 64-bit platforms properly. 2008-10-16 16:31:35 +00:00
Anthony Tuininga
4d2a8c57de Dropped support for Python 2.3. 2008-10-16 04:19:14 +00:00
Anthony Tuininga
5bf582907c Remove remaining references to PyString_* functions to enable support for full
Unicode mode and eventual support for Python 3.x.
2008-10-16 04:08:15 +00:00
Anthony Tuininga
d8f9b4687e Tweaks to make pickier compilers happy and handle wide unicode correctly. 2008-10-16 02:31:04 +00:00
Anthony Tuininga
515bca0f96 All test cases now run correctly in Unicode mode. There are still additional
things that need to be dealt with but the majority of the code has now been
transformed to use either Unicode or encoded strings with Oracle.
2008-10-15 22:45:29 +00:00
Anthony Tuininga
eae705cef1 Rename additional macro as suggested by Amaury Forgeot d'Arc; added additional
support for full Unicode; in Python 2.x allow for keyword arguments which use
strings and simply convert them to Unicode on the way through.
2008-10-14 16:53:05 +00:00
Anthony Tuininga
7d67968e3a Rename macros as suggested by Amaury Forgeot d'Arc. 2008-10-14 15:55:37 +00:00
Anthony Tuininga
2e26d0beb8 Continued work on Unicode support; added new test cases for full unicode
support within Python 2.x; move away from character semantics which Oracle is
deprecating anyway to byte semantics which should hopefully eliminate the
problem with a backend character set of UTF-8.
2008-10-14 04:51:43 +00:00
Anthony Tuininga
dcb996e338 Explicitly drop support for versions earlier than Python 2.3 with the advent
of Python 2.6.
2008-10-10 04:30:53 +00:00
Anthony Tuininga
c424a823a8 First cut at adding support for full unicode which is required by Python 3 but
the code is structured so that this can be done with Python 2.x as well if
desired; the only thing currently working is the determination of error
messages.
2008-10-10 04:18:05 +00:00
Anthony Tuininga
a2466272b5 Expose the DATETIME variable type properly instead of using the return value
type; thanks to Amaury Forgeot d'Arc for pointing out this discrepancy.
2008-10-09 21:59:09 +00:00
Anthony Tuininga
1a5c2bfaa7 To be consistent with the output converter always call the input converter
even if the value coming is is null.
2008-10-09 13:35:48 +00:00
Anthony Tuininga
c857cb1f0b Fix reference to input type handler. 2008-10-09 13:32:32 +00:00
Anthony Tuininga
08e308b83b Added support for specifying an input type handler to control what kind of
variable is created and eliminated the leak when an output type handler would
be specified.
2008-10-08 22:41:47 +00:00
Anthony Tuininga
79679142d2 Added support for specifying converters for both input and output. 2008-10-08 19:11:23 +00:00
Anthony Tuininga
8e506ceeea Make a base type for all variables so that the attributes and methods are
shared without having to specify such; remove references to methods that get
the attributes and methods dynamically since these are deprecated in Python 2.6
and above. Thanks to Amaury Forgeot d'Arc for the initial patch.
2008-10-02 19:00:06 +00:00
Anthony Tuininga
243849a5ff Use Py_TYPE to determine the type of an object rather than referencing the
attribute directly as suggested by Amauary Forgeot d'Arc.
2008-10-02 17:24:21 +00:00
Anthony Tuininga
abecfc7631 Tweaked source as suggested by Amaury. 2008-10-02 14:31:59 +00:00
Anthony Tuininga
e0e7675264 Verify that the variable returned can support the fetch. 2008-09-30 22:04:25 +00:00
Anthony Tuininga
ea3def86c5 Added support for returning unicode values for nchar and nvarchar data and
for binding unicode. Thanks to Amaury Forgeot d'Arc for the initial patch.
2008-09-30 18:11:45 +00:00
Anthony Tuininga
6b1a551997 Use a cx_Oracle.Error instance rather than a string to hold the error as
requested by Helge Tesdal.
2008-09-26 04:52:47 +00:00