[Twisted-Python] adbapi results through xmlrpc

Michal Pasternak michal at pasternak.w.lub.pl
Wed Mar 31 16:50:13 EST 2004

Zach Thompson [Wed, Mar 31, 2004 at 01:08:09PM -0800]:
>     def xmlrpc_get_count(self):
>         from twisted.enterprise import adbapi
>         pool = adbapi.ConnectionPool("pyPgSQL.PgSQL", database="zach")
>         return pool.runQuery("select count(*) from asdf")

	return lambda results: int(result[0])

Some DBAPI modules return actually objects of various types sometimes...

>   Failure: xmlrpclib.Fault: <Fault 8002: "can't serialize output">

... which are not serializable.

Michal Pasternak :: http://pasternak.w.lub.pl :: http://winsrc.sf.net

More information about the Twisted-Python mailing list