[Cubicweb] some cubicweb goals for 2010

Adrien Di Mascio adrien.dimascio at logilab.fr
Mon Apr 26 10:50:06 CEST 2010


Hi,

On Monday 26 April 2010 10:32:53 Sylvain Thénault wrote:
> On 25 avril 22:40, Florent Cayré wrote:
> > What comes to mind right now is :
> > the presence of a "all_attrs" fetch_attr helper would be
> > appreciated also.
>
> I don't get the all_attrs thing. Could you explain a bit more?

I guess we're talking of an helper that would fetch all attributes 
without the need to explicit them all.

On a more or less related topic, I don't like having to explicitly add 
a bunch of selected variables in order to optimize later attribute 
fetching, as in :

 Any X, XN, XD, XT, XF WHERE X is Foo, X name XN, X date XD,
  X title XT, X foo XF

In my opinion, this seriously affects readability of complex queries. 
I would like a helper function for such case. For instance :

 rql = "Any X WHERE X is Foo" 
 rql = prefetch_rql(rql, {"X": ('name', 'date', 'title', 'foo')})

I obviously haven't thought much of the API but this is roughly the 
idea.

-- 
Adrien Di Mascio - LOGILAB, Paris (France).
Tél: 01.45.32.03.12
Formations - http://www.logilab.fr/formations
Développements - http://www.logilab.fr/services
Gestion de connaissances - http://www.cubicweb.org/



More information about the Cubicweb mailing list