30 Commits

Author SHA1 Message Date
961e135324 Argh 2000-08-16 19:29:58 +00:00
4f8e1183f2 A little support for old-style dictionary fetching. 2000-08-09 21:47:48 +00:00
6e7c139b0d Modify quoting for MySQL-3.23. 2000-08-09 20:19:10 +00:00
47edf13df1 Fix memory leak (maybe). 2000-07-11 20:56:29 +00:00
4eb68e9f05 Make commit and rollback truly functional. 2000-06-23 18:55:10 +00:00
ad5a4e3056 Optimization (I hope). 2000-05-02 04:39:51 +00:00
bdb3b8948d Remove debugging statement. 2000-04-20 00:21:27 +00:00
4dcca6779b Bug fixes. 2000-04-20 00:10:42 +00:00
727b0d2122 Rename some hidden attributes. 2000-04-13 21:29:19 +00:00
7bb113c6eb A teensy optimization. 2000-04-08 03:07:57 +00:00
3bc2e7a9d3 A big (I hope) optimization and hooks for transaction support. 2000-03-28 17:09:29 +00:00
d4529e5d15 Break up the various cursor variations into MixIn classes.
Found a work-around for the way MySQL treats TIME literals with
dates and/or fractional seconds.

Added a mutex into the cursor so that connections can be shared between
threads. threadsafety=2

I could easily make the cursors sharable as well (threadsafety=3) but
I hardly see the point. Even sharing connections is not a good idea,
because you don't get the benefit of multiple mysqld threads.
2000-03-24 05:46:00 +00:00
abfd616405 Add some support for MySQL-3.23 features.
Fixed a few miscellaneous things.
2000-03-14 04:47:52 +00:00
9aead60fe3 Support for fetching rows as dictionaries, a la MySQLmodule. 2000-03-08 22:50:06 +00:00
844f142a2f Add some wrapper methods to get at some MySQL-specific functions. 2000-02-18 03:49:46 +00:00
42bd06e986 Add a dictionary that controls conversion of Python types into
MySQL literals.
2000-01-07 00:30:44 +00:00
589df8797c User-suggested fix. 1999-11-19 18:30:31 +00:00
e557a5e93f User-contributed bugfixes. 1999-10-12 01:55:45 +00:00
7298ac1ed3 User-contributed fix: Convert None to NULL correctly when passing a
dictionary as the parameters to execute.
1999-08-02 21:29:31 +00:00
f88e77d033 Minor tweaks.
ZMySQLDA.patch makes Zope's ZMySQLDA compatible with MySQLdb (maybe).
1999-07-20 04:04:20 +00:00
c3d23b6858 _mysql: Move type converter initialization outside of module. When opening
the connection, a mapping of MySQL types to Python functions may be passed
as the keyword argument conv. This is stored as the converter attribute
on the connection object, and may be modified, assigned, etc.

MySQLdb: Build full converter dictionary, pass along to _mysql when
creating a connection.

MySQL_doc: Fixed a minor documentation bug.
1999-07-15 22:14:42 +00:00
2353d9ff30 Minor user-contributed stuff. 1999-07-08 03:05:10 +00:00
d7643502b1 Whoops. 1999-04-21 03:49:32 +00:00
bac59056aa Fix a typo.
Make it a bit more robust if DateTime can't be imported.
1999-04-08 01:48:33 +00:00
7be272c332 __doc__ strings. 1999-04-01 06:45:02 +00:00
675b285a7b Minor bugfix on _mysql: Set exception if non-sequence is passed to
escape_row().

Updating for version 2.0 of the API.
1999-03-30 07:59:51 +00:00
55d15aeb83 Modified to use new _mysql result object methods.
A few changes to bring back into line with the (still-changing) API.
1999-03-25 07:13:06 +00:00
31a706efde Finally chased down an ugly memory leak in _mysql. Tested with a script
I got from mxODBC author Marc-Andre Lemburg, which revealed the leak in
the first place.

Added a connection.rollback() method that always raises an
OperationalError, since MySQL doesn't have transactions.
connection.commit() still succeeds without doing anything.
1999-03-18 06:20:14 +00:00
e1970cf20b Updated _mysql to do some type conversion. Adds a dictionary type_conv
which makes MySQL field types to Python functions which perform the
conversion. All numeric types except DECIMAL are mapped into either
PyInt or PyLong, and the floating point types are mapped into PyFloat by
default. Types which are not represented in the dictionary are returned
as strings.

Modified MySQLdb to adjust type_conv so that the various date/time types
are returned as DateTime objects.

Bug: If you were to delete or assign type_conv, bad things would happen.
I haven't actually tried this, but it wouldn't be good. May add an extra
reference count to prevent this, haven't really decided.
1999-03-17 02:20:42 +00:00
161f66f556 Added a _mysql.quote_row() function which takes a row of data as a tuple
and quotes it, converting None into NULL.

MySQLdb.py is the DBI-1.1 compatible wrapper.

To do: Type conversions for fetch_row().
1999-03-16 05:22:46 +00:00