[Zope3-dev] Queries (was Re: personal conceptual questions)

Chris Withers chrisw@nipltd.com
Thu, 08 May 2003 16:43:12 +0100


Shane Hathaway wrote:
> cursor.execute("select key from shows where "
>                "date >= '2003-05-05' and date <= '2003-06-06'")
> rows = cursor.fetchall()
> objs = [jar.loadStub((row[0],)) for row in rows]

Is this like the 'query' method Roché and I were chatting about with you in 
February?

> I've been discussing relationships for exactly this purpose.  I want 
> relationship (and relational) capabilities in ZODB so that I can mimic 
> them in Ape.  I'd like to hide all SQL from the application.  But I just 
> read an article by Fowler that convinced me that hiding SQL is not 
> always the best thing to do.  So now I'm considering a direct-query 
> interface again. 

yay! I'm a strong proponent of letting SQL do what it's good at which still 
letting us play predomininantly with objects...

> Thanks for the information about Modeling, though.  I still wonder if 
> mixing Modeling and Ape might work.

I'd be fascinated with any results. Gimme a kick if you have stuff that wants 
testing...

cheers,

Chris