server/test/unittest_rql2sql.py
changeset 3674 387d51af966d
parent 3589 a5432f99f2d9
parent 3632 874f5a73e89f
child 3720 5376aaadd16b
equal deleted inserted replaced
3661:12ea53a4c0da 3674:387d51af966d
   565      'EXISTS(A use_email O, EXISTS(A identity B, NOT B in_group D, D name "guests", D is CWGroup), A is CWUser), B eid 2',
   565      'EXISTS(A use_email O, EXISTS(A identity B, NOT B in_group D, D name "guests", D is CWGroup), A is CWUser), B eid 2',
   566      '''SELECT O.cw_eid, O.cw_address, O.cw_alias, O.cw_modification_date
   566      '''SELECT O.cw_eid, O.cw_address, O.cw_alias, O.cw_modification_date
   567 FROM cw_EmailAddress AS O
   567 FROM cw_EmailAddress AS O
   568 WHERE NOT EXISTS(SELECT 1 FROM use_email_relation AS rel_use_email0 WHERE rel_use_email0.eid_from=1 AND rel_use_email0.eid_to=O.cw_eid) AND EXISTS(SELECT 1 FROM use_email_relation AS rel_use_email1 WHERE rel_use_email1.eid_to=O.cw_eid AND EXISTS(SELECT 1 FROM cw_CWGroup AS D WHERE rel_use_email1.eid_from=2 AND NOT EXISTS(SELECT 1 FROM in_group_relation AS rel_in_group2 WHERE rel_in_group2.eid_from=2 AND rel_in_group2.eid_to=D.cw_eid) AND D.cw_name=guests))
   568 WHERE NOT EXISTS(SELECT 1 FROM use_email_relation AS rel_use_email0 WHERE rel_use_email0.eid_from=1 AND rel_use_email0.eid_to=O.cw_eid) AND EXISTS(SELECT 1 FROM use_email_relation AS rel_use_email1 WHERE rel_use_email1.eid_to=O.cw_eid AND EXISTS(SELECT 1 FROM cw_CWGroup AS D WHERE rel_use_email1.eid_from=2 AND NOT EXISTS(SELECT 1 FROM in_group_relation AS rel_in_group2 WHERE rel_in_group2.eid_from=2 AND rel_in_group2.eid_to=D.cw_eid) AND D.cw_name=guests))
   569 ORDER BY 4 DESC'''),
   569 ORDER BY 4 DESC'''),
       
   570 
       
   571 
       
   572     ("Any X WHERE X eid 0, X eid 0",
       
   573      '''SELECT 0'''),
       
   574 
       
   575     ("Any X WHERE X eid 0, X eid 0, X test TRUE",
       
   576      '''SELECT X.cw_eid
       
   577 FROM cw_Personne AS X
       
   578 WHERE X.cw_eid=0 AND X.cw_eid=0 AND X.cw_test='''),
   570     ]
   579     ]
   571 
   580 
   572 MULTIPLE_SEL = [
   581 MULTIPLE_SEL = [
   573     ("DISTINCT Any X,Y where P is Personne, P nom X , P prenom Y;",
   582     ("DISTINCT Any X,Y where P is Personne, P nom X , P prenom Y;",
   574      '''SELECT DISTINCT P.cw_nom, P.cw_prenom
   583      '''SELECT DISTINCT P.cw_nom, P.cw_prenom