[Zope-dev] zope.rdb problem (as it looks)

Brian Sutherland brian at vanguardistas.net
Mon Apr 7 06:46:10 EDT 2008


On Mon, Apr 07, 2008 at 09:31:24AM +0200, Adam GROSZER wrote:
> Hello Brian,
> 
> I would say, rip that catch-all out. Actually I must not do that
> otherwise I'll break some people's code.
> It's maybe time for z3c.rdb or something like this?

I think something a whole lot simpler/smaller would definitely be nice.
Most of what zope.rdb does is redundant, especially with things like
SQLAlchemy and psycopg2 around.

In fact this the only 2 features I really need are:

    * A single interface to get a DB-API like connection as a utility
        i.e. conn = getUtility(IZopeDatabaseAdapter)
    * integration with the transaction module

In fact, I'd probably be happy with a package that only defines a very basic
interface I can use to get a database connection.

Basically just something that allows me to do basic things like:

    conn = getUtility(IDatabaseConnection, name=u'myconn')
    cur = conn.cursor()
    cur.execute("SELECT 1")
    desc, result = cur.fetchall()

That way I can start migrating away from zope.rdb and to SQLAlchemy in a
regular fashion.

> 
> Friday, April 4, 2008, 10:17:50 PM, you wrote:
> 
> 
> BS> This has come up previously:
> 
> BS> http://www.nabble.com/zope.rdb-error-and-zope.publisher-error-td10199840.html
> 
> 
> 
> -- 
> Best regards,
>  Adam GROSZER                            mailto:agroszer at gmail.com
> --
> Quote of the day:
> Charity is injurious unless it helps the recipient to become independent of it. 
> - Anonymous 
> 

-- 
Brian Sutherland


More information about the Zope-Dev mailing list