[Cubicweb] CWEP-0002 - RQL rewriting
Adrien Di Mascio
adrien.dimascio at logilab.fr
Fri Dec 20 10:26:20 CET 2013
Hi,
Le 20/12/2013 09:41, Sylvain Thénault a écrit :
> On 18 décembre 15:18, Léa Capgen wrote:
>> class Company(EntityType):
>> name = String()
>> total_salary = Int(computed=('Any SUM(SA) GROUPBY S WHERE P
>> works_for S, P salary SA'))
>
> It's time to decide if we want S or X here. My vote goes for X.
X seems indeed more consistent.
>> Map RDF to Yams
>> ...................
>>
>> Given the following XY equivalences:
>>
>> .. sourcecode:: python
>>
>> xy.add_equivalence('CWUser', 'foaf:Person')
>> xy.add_equivalence('Person', 'foaf:Person')
>>
>> when writing::
>>
>> Any S WHERE S is foaf:Person
>>
>> we would like the query to be rewritten as::
>>
>> Any A WHERE A is IN(Person, User)
>
> As already said, I'ld remove that from this document which is about having way
> to define "computed" relation/attribute.
I don't agree. I consider this a valid rql rewriting use case. Why
wouldn't that fit in this document ?
>> + The rules are written in a dictionnary like {premisse :
>> conclusions}. The premisse is a unique relation.
>
> I don't get this point. This seems very internal stuff, is it necessary for this
> document. Also dictionary has a single 'n' :)
+1 to remove this from the document.
--
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