[Twisted-Python] Twisted and Postgresql

Itamar Shtull-Trauring itamar at itamarst.org
Sun Aug 10 11:21:41 MDT 2003


On Sat, 9 Aug 2003 18:19:25 -0400 (EDT)
Edmund Dengler <edmundd at eSentire.com> wrote:

> When trying to transfer a row set, which was obtained using the
> pyPgSQL module, I am having problems with specific types not being
> jelly-able. In particular, the row itself
> PgResultSetConcreteRow(?)(this is from memory) and PgInt2 (which I
> found out by trying to send individual elements of the row set over).
> Has anybody else encountered these, and is there a solution other than
> defining my own set of jelly-able components (for example, is there a
> stock jelly library someplace)?

Just convert them into lists and ints or dicts, the applicable python
object that the pypgsql type emulates. SO, write a function that
recurses a postgresql result and cleans it up, and then addCallback it
to the Deferred of the database query result.

-- 
Itamar Shtull-Trauring    http://itamarst.org/
Available for Python & Twisted consulting




More information about the Twisted-Python mailing list