cubicweb/server/test/unittest_rql2sql.py
branch3.26
changeset 12296 23bc9f385645
parent 12236 75a6b2f40c44
child 12567 26744ad37953
equal deleted inserted replaced
12293:e36f2c862d5c 12296:23bc9f385645
  1435                     '''SELECT _X.cw_eid
  1435                     '''SELECT _X.cw_eid
  1436 FROM cw_CWUser AS _X
  1436 FROM cw_CWUser AS _X
  1437 WHERE _X.cw_login ~ [0-9].*
  1437 WHERE _X.cw_login ~ [0-9].*
  1438 ''')
  1438 ''')
  1439 
  1439 
       
  1440     def test_aggregate_in_orderby(self):
       
  1441         self._check("Any X GROUPBY X ORDERBY ABS(COUNT(Y)) WHERE"
       
  1442                     "X is CWGROUP, Y is CWUSER, Y in_group X",
       
  1443                     '''SELECT rel_in_group1.eid_to
       
  1444 FROM in_group_relation AS rel_in_group1, is_relation AS rel_is0, is_relation AS rel_is2
       
  1445 WHERE rel_in_group1.eid_to=rel_is0.eid_from AND rel_in_group1.eid_from=rel_is2.eid_from
       
  1446 GROUP BY rel_in_group1.eid_to
       
  1447 ORDER BY ABS(COUNT(rel_in_group1.eid_from))
       
  1448 ''')
       
  1449 
  1440     def test_parser_parse(self):
  1450     def test_parser_parse(self):
  1441         for rql, sql in PARSER:
  1451         for rql, sql in PARSER:
  1442             with self.subTest(rql=rql):
  1452             with self.subTest(rql=rql):
  1443                 self._check(rql, sql)
  1453                 self._check(rql, sql)
  1444 
  1454