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
31013767c6
Eliminate compiler warning.
2016-01-13 11:33:07 -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
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
fc1bc2ecda
Need to use type ub4 instead of ub8 for determining number of batch errors.
2014-09-30 20:53:49 -06:00
Anthony Tuininga
633a3bcad5
Added support for retrieving batch errors.
2014-09-24 22:22:13 -06:00
Anthony Tuininga
8f6f54801c
Added support for getting array DML row counts (new to Oracle 12c).
2014-09-24 20:45:06 -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
6aa817956f
OCI_ATTR_PARSE_ERROR_OFFSET should be of type ub2; also handle case when the
...
exception has been normalized already (and with this change force the exception
to be normalized) as in that case the cx_Oracle.Error object is not directly
accessible as originally assumed (which caused a segfault to take place).
2014-05-13 15:09:34 -06:00
Anthony Tuininga
f80fc7f211
Use the actual name of the class, not a manufactured name.
2013-04-02 13:16:11 -06:00
Anthony Tuininga
3d0c96cb78
Set the row number for PL/SQL blocks as well as requested by Robert Ritchie.
2012-03-27 09:44:27 -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
0665dff62b
Remove unnecessary code.
2010-11-04 16:48:33 +00:00
Anthony Tuininga
cf2da5efc8
Check the result of freeing the handle if an exception should be raised; in
...
addition, null the handle so that a second attempt is not made when the cursor
is freed after close() has been called.
2010-11-04 16:36:09 +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
25274ca3fb
Fix error message.
2010-05-28 18:10:12 +00:00
Anthony Tuininga
0c859f8b87
Added support for named arguments in callproc() and callfunc() which make use
...
of PL/SQL notation for making such calls.
2009-09-29 04:56:31 +00:00
Anthony Tuininga
1470723453
Use the OCI_ATTR_CHAR_SIZE attribute to determine the character size of the
...
value retrieved rather than attempt to assume things since the database
character set plays a role in how this is determined and that information is
not readily available. Thanks to Christopher Jones for the tip.
2009-09-15 03:55:03 +00:00
Anthony Tuininga
057f7ee133
Move the resetting of the setinputsizes flag to before the binding takes place
...
so that if an error takes place and a new statement is prepared subsequently
that spurious errors will not occur.
2009-08-28 21:17:18 +00:00
Anthony Tuininga
919c5b4559
Implemented a parse error offset as requested by Catherine Devlin.
2009-05-21 04:51:00 +00:00
Anthony Tuininga
ab360bfb4e
Re-enable parsing of non select statements as requested by Ray Terrill.
2009-04-22 17:50:09 +00:00
Anthony Tuininga
b32352b54c
Don't lose the Python lock before all possible Python code has been executed.
2009-01-07 15:50:16 +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
4b208c603a
Ensure memory is freed if the acuisition of the bind names fails entirely.
2008-11-21 16:08:51 +00:00
Anthony Tuininga
4692ae6a71
Never mind using row_factory, the signature of the method is different.
2008-10-19 04:54:53 +00:00
Anthony Tuininga
080b53f147
Use row_factory in preference to rowfactory since the builtin sqlite3 module
...
does it that way and its better to be compatible with such things.
2008-10-17 22:53:20 +00:00
Anthony Tuininga
ebc2437935
Make the bind variables and fetch variables accessible although they need to be
...
treated carefully since they are used internally; return the cursor from
the execute() method as a convenience.
2008-10-17 16:39:30 +00:00
Anthony Tuininga
93bdbb7425
Replace PyBytes_ with cxString to make Python 3.x happy.
2008-10-17 03:30:07 +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
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
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
45faba4a48
Further work on supporting Unicode.
2008-10-11 05:04:26 +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
4271cb4af4
If the variable creation fails, don't use the result!
2008-10-09 22:01:34 +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
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
6c13ccbe5f
Use macro PyVarObject_HEAD_INIT as suggested by Amaury Forgeot d'Arc in order
...
to facilitate migration to Python 3.0.
2008-10-02 17:34:16 +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
b9d081ae12
Added support for specifying the arraysize of the variable being created.
2008-09-30 22:11:11 +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
780423a59e
As requested by Helge Tesdal, allow an output type handler to be specified
...
at the connection and cursor levels. This handler will be called for each
variable being defined with the parameters cursor, name, defaultType, size,
precision and scale and expects to have a variable of the correct type
returned or None to indicate that default processing should take place.
2008-08-05 03:32:19 +00:00
Anthony Tuininga
93490d971d
Removed support for Oracle 8i since Oracle support for it was dropped long
...
ago and adding support for Oracle 11g features would be very difficult
while attempting to retain Oracle 8i support.
2008-06-28 04:44:04 +00:00
Anthony Tuininga
9b56028455
Set the default array size to 50 instead of 1 as the DB API suggests because
...
the performance difference is so drastic and many people have recommended that
the default be changed.
2008-05-23 15:58:11 +00:00
Anthony Tuininga
236e494456
Defer type assignment when performing executemany() until the last possible
...
moment if the value being bound in is null as suggested by Dragos Dociu.
2008-03-21 22:13:51 +00:00
Anthony Tuininga
09d5ba4c25
Add support for acquiring cursor.description after a parse.
2007-10-24 20:52:29 +00:00