[Cubicweb] RQL: substitution of values for IN predicate

Alexandre Fayolle alexandre.fayolle at logilab.fr
Mon Nov 29 10:35:22 CET 2010


Hello

Suppose I have something like:

wanted_values = [u'foo', u'bar', u'baz']

query = 'Any X WHERE X is Mumble, X name IN %(values)s'

As far as I understand, there is no way in the current implementation to pass 
the query as it is now to execute(), with wanted values being part of a 
dictionary of substitutions passed as the second argument. Therefore I have to 
do the substitution for the list of values myself. This probably has an impact 
on the caching of the query on the server side, as such queries have to be 
reparsed each time. 

Am I the only one who would like to be able to::

 _cw.execute(query, {'values': wanted_values}) 

in other words should I file a ticket for this?


-- 
Alexandre Fayolle                              LOGILAB, Paris (France)
Formations Python, CubicWeb, Debian :  http://www.logilab.fr/formations
Développement logiciel sur mesure :      http://www.logilab.fr/services
Informatique scientifique:               http://www.logilab.fr/science


More information about the Cubicweb mailing list