9 Commits

Author SHA1 Message Date
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