[Cubicweb] Proposal: new method ResultSet.one()

Nicolas Chauvat nicolas.chauvat at logilab.fr
Thu Dec 5 18:57:36 CET 2013

On Thu, Dec 05, 2013 at 04:07:46PM +0100, Christophe de Vienne wrote:
> The difference is that next will not enforce that only one entity is returned by the query.
> >>
> >> entity = execute('SOME REQUEST').one()

What about the following ?

  entity = execute('Any X LIMIT 1 WHERE SOME QUERY').get_entity(0,0) 

Nicolas Chauvat

logilab.fr - services en informatique scientifique et gestion de connaissances  

More information about the Cubicweb mailing list