Anthony Tuininga
ab42359f26
Fix cursor.scroll() to calculate row count correctly in all situations and
...
add test cases to verify that it does in fact work.
2017-01-12 15:22:29 -07:00
Anthony Tuininga
59053718be
Remove memory leak when function call raises an exception.
2017-01-12 14:09:27 -07:00
Anthony Tuininga
d4eb90d848
The current position does not need to be checked upon execute (since we are
...
always moving forward) and especially not since its value is always zero in
any case!
2017-01-12 14:08:05 -07:00
Anthony Tuininga
9c8cc1160b
Only allow up to 10,000 arguments -- any more than that likely wouldn't work
...
anyway (or be reasonable) and this prevents a possible improper memory access
from taking place if an attempt was made to pass more than 10,000 arguments.
2016-02-29 09:19:19 -07:00
Anthony Tuininga
39805c66d7
Added support for binding objects with sub objects attached to them; ensured
...
that instances are created when an empty object variable is created; enhanced
test cases for binding objects.
2016-02-11 11:47:46 -07:00
Anthony Tuininga
3eeff96403
Added support for scrollable cursors.
2016-02-05 17:19:40 -07:00
Anthony Tuininga
812ad4bd25
Added support for large row counts (larger than 2 ** 32) and laid the
...
groundwork for adding support for scrollable cursors.
2016-02-05 09:34:00 -07:00
Anthony Tuininga
e24fa35d93
Added support for getting implicit results (available in Oracle 12.1).
2016-01-21 17:11:57 -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
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