[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zope3-users
Subject:    [Zope3-dev] Re: [Zope3-Users] mysqldbda database adapter
From:       farcepest () gmail ! com (Andy Dustman)
Date:       2005-03-19 19:59:09
Message-ID: 9826f38005031916572bde58be () mail ! gmail ! com
[Download RAW message or body]

On Sun, 20 Mar 2005 00:35:31 +0100, Roger Ineichen <dev@projekt01.ch> wrote:

> Take a look at the repository, perhaps this package is working.
> I know only that Stephan was working the last time at the
> sprint in Munich at this package.
> 
> http://svn.zope.org/mysqldbda/

At first glance (mainly at adapter.py), it seems this could be
simplified a bit when using MySQLdb-1.2.0, as you can pass
use_unicode=True in connect and automatically get all strings as
unicode, thus eliminating the need for MySQLStringConverter.

Also, it would be very easy to configure MySQLdb to return the correct
Python types in other cases. MySQLdb.converters.conversions is a
dictionary that maps MySQL numeric column types to callable objects
which convert a string to a Python type. Most of the time, these are
Python built-ins, such as int or float. str is the default action.
1.2.0 uses the Python datetime classes, and it appears ZopeX3 uses
them now, so the only thing that is likely to be needed to be changed
is BLOB columns (returned as array('c',...); Zope probably still wants
strings).

For examples of how to do this, look at ZMySQLDA-2.0.9b3.
-- 
Computer interfaces should never be made of meat.

Using GMail? Setting Reply-to address to <> disables this annoying feature.

You are in a maze of twisty little passages all alike.
To go north, press 2. To go west, press 4.
To go east, press 6. To go south, press 8. 
If you need assistance, press 0 and a little dwarf
will assist you.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic