46 Commits

Author SHA1 Message Date
38075e7264 Duh. 2001-05-01 02:05:40 +00:00
74ecb7ece6 Move type conversion dictionaries to _mysql_const.converters. 2001-04-28 03:30:40 +00:00
3a7ac36509 Be extra-paranoid about default instance quoting. 2001-04-22 01:56:55 +00:00
3fbda72e18 Some experimental support for quoting instances. 2001-04-22 01:54:14 +00:00
915bad12fc Break a cycle that prevented GC. 2001-04-19 17:31:15 +00:00
31fb50202d Lots of new __doc__ strings and other odds and ends
for new pydoc module in Python 2.1.

Exceptions have been moved into _mysql_const/exc.py.
Mostly this is for documentation purposes. Mostly.
2001-04-18 04:06:04 +00:00
a3bbc56112 ARGH! 2001-03-26 01:17:58 +00:00
64b201fe09 Horrible, stupid error 2001-03-17 01:03:24 +00:00
ce137a31c2 Watch for PEBKAC problems. 2001-03-14 23:34:16 +00:00
e00de5823c Finally, a definitive way to determine if transactions are available. 2001-03-12 18:08:02 +00:00
84bedad4a4 Find and plug memory leak. 2001-03-12 02:58:03 +00:00
7fde6af818 Fix mxDateTime import for version 2.0.0 (now mx.DateTime). 2001-03-12 01:28:29 +00:00
0d2838f5a4 Bugfix. 2001-02-09 16:56:20 +00:00
d480ad766a Update docs.
result.fetch_row(0,how) returns all rows of the rsult set as a tuple.
2001-01-27 02:32:00 +00:00
0540b4022d Better support for new features.
Improved quoting.
2000-10-31 19:51:20 +00:00
21846c7d2a Move escape_dict functionality into _mysql.
str(long) in Python 2.0 doesn't add a trailing L.
2000-10-23 22:52:01 +00:00
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