[Cubicweb] About RQL language and its correct use

Carlos Balderas carlos.balderas at gmail.com
Mon Apr 26 22:51:53 CEST 2010


Hello List!

Writting good RQL sentences.

Is it better to write rql sentence like:

ANY X WHERE X is "EntityType", X eid "EID"

or just something like this:

ANY X WHERE X eid "EID"
------------------------------------------------ 0
------------------------------------
ANY X WHERE X is "EntityType", X in_state Y, Y is State, Y name
"SOMESTATENAME"

or just something like this:

ANY X WHERE X is "EntityType", X in_state Y, Y name "SOMESTATENAME"

or if X is the only entity type that can have "SOMESTATENAME" state

ANY X WHERE X in_state Y, Y name "SOMESTATENAME"
------------------------------------------------ 0
------------------------------------

Using "is" sometimes is necesary when we need to filter certain types of
entities in rql sentences and this kind of structure sometimes helps the
programmer to understand quickly what we are looking for in the rql query,
but other times make bigger rql queries and I would like to know if this can
help to improve or adversely affect the rql performance in some way.

Thank you very much for your opinions and comments
Regards
Carlos Balderas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20100426/19e8e48d/attachment-0047.html>


More information about the Cubicweb mailing list