32 Commits

Author SHA1 Message Date
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
Anthony Tuininga
fd613fce73 Prevent error "ORA-24333: zero iteration count" from taking place as requested
by Andreas Mock.
2007-09-29 22:36:06 +00:00
Anthony Tuininga
2b30ecde28 Added support for connection.stmtcachesize which allows for both reading and
writing the size of the statement cache size. This parameter can make a huge
difference with the length of time taken to prepare statements. Added support
for setting the statement tag when preparing a statement. Both of these were
requested by Bjorn Sandberg who also provided an initial patch. Cleaned up some
error context strings as well.
2007-07-28 05:26:57 +00:00
Anthony Tuininga
39c33faea4 Added support for autocommit mode as requested by Ian Kelly. 2007-07-11 04:10:39 +00:00
Anthony Tuininga
686efca6a9 Free the row factory when the cursor is being freed; clear the row factory
when a new statement is prepared since it is very likely that the new statement
will not be compatible with the old and having to clear it manually each time
would be rather tedious.
2007-07-04 17:26:21 +00:00
Anthony Tuininga
eb18c5d52d Added attribute cursor.rowfactory which allows a method to be called for each
row that would be returned; this is about 20% faster than calling the method
in Python instead using the idiom [method(*r) for r in cursor].
2007-07-04 16:57:36 +00:00
Anthony Tuininga
5025b4eb22 Replaced all tabs with spaces. 2007-06-27 14:00:34 +00:00
Anthony Tuininga
104e11b67a Last public release from Computronix. 2007-06-13 21:15:16 +00:00