[Cubicweb] A Query API experiment

Christophe de Vienne christophe at unlish.com
Tue Jun 10 17:41:35 CEST 2014

Le 10/06/2014 17:23, Aurélien Campéas a écrit :
> On 10/06/2014 16:42, Nicolas Chauvat wrote:
>> Hi Christophe,
>> On Tue, Jun 10, 2014 at 04:28:31PM +0200, Christophe de Vienne wrote:
>>> A few month ago (at the first cw sprint of the year), I presented a
>>> slide on what a query API could be like.
>>> [...]
>> Thank you for sharing this work.
>> I find RQL more readable and I have never been a fan of SQLAlchemy's
>> query/ORM API, but it is very good that people try new ways of doing
>> things with CubicWeb... and maybe I will see the light and learn to
>> like it ! :D
> [...]
> There are some situations where a Query builder would be useful, if
> only for programmatic reasons (see e.g. RqlQuery in
> web/views/editcontroller).
The reason for improving the API recently was to make the wsme cube
implementation easier.

> I think having something like this in the *core* would be of some
> value. But of course I'd advocate playing with it as is before taking
> any long-term binding decision.

> Nitpick: I'd prefer ".filter()" to be spelt ".where()", but it's just
> me.

I used filter by lack of inspiration, when I concluded that "any()" or
"has()" (from SQLAlchemy) did not fit.
So I am open to propositions for improvement !



More information about the Cubicweb mailing list