[Twisted-Python] Case for an Async MySQL Driver?

Seun Osewa naijasms at gmail.com
Thu Oct 28 19:32:46 EDT 2004


The approach I was suggesting is to have a minimalist 'driver' API for
MySQL which can be used independently (for new development of
MySQL-specific projects) and yet can be easily used for MySQL support
in adbapi.

Correcting my earlier short outline,
-> a minimalistic mysql 'driver' API shouldn't even involve a DB pool. 
-> The 'result' can simply be in the form of an iteratable which
returns the result of each executed query in order, no need for the
restriction to have only one query within a group of MySQL commands.
-> However, the errBack should be called when any of queries fail,
indicating how which particular query failed by giving the number of
successful queries.
conn = MySqlConnection ("hostname", "username", "password")
d = conn.exec (["stmt1", "stmt2",  "stmt3"])
conn.close()    # we have finished with this connection.

def call1(result):
def err1 (successful_queries, errno, description):

It appears reasonable to allow the connection constructor to block
when creating the database connections ... the API user should deal
with connection caching.


On Thu, 28 Oct 2004 17:00:57 -0400, orbitz <orbitz at ezabel.com> wrote:
> Hrm, wouldn't it be a bit nicer on programmers to use the current adbapi
> interface so they can just move all their code to this new mysql API?

More information about the Twisted-Python mailing list