704 def test_restricted_max(self): |
704 def test_restricted_max(self): |
705 # dumb query to emulate the one generated by svnfile.entities.rql_revision_content |
705 # dumb query to emulate the one generated by svnfile.entities.rql_revision_content |
706 self._test('Any V, MAX(VR) WHERE V is Card, V creation_date VR, ' |
706 self._test('Any V, MAX(VR) WHERE V is Card, V creation_date VR, ' |
707 '(V creation_date TODAY OR (V creation_date < TODAY AND NOT EXISTS(' |
707 '(V creation_date TODAY OR (V creation_date < TODAY AND NOT EXISTS(' |
708 'X is Card, X creation_date < TODAY, X creation_date >= VR)))', |
708 'X is Card, X creation_date < TODAY, X creation_date >= VR)))', |
709 [('FetchStep', [('Any VR WHERE X creation_date < TODAY, X creation_date >= VR, X is Card', |
709 [('FetchStep', [('Any VR WHERE X creation_date < TODAY, X creation_date VR, X is Card', |
710 [{'X': 'Card', 'VR': 'Datetime'}])], |
710 [{'X': 'Card', 'VR': 'Datetime'}])], |
711 [self.cards, self.system], None, |
711 [self.cards, self.system], None, |
712 {'VR': 'table0.C0', 'X.creation_date': 'table0.C0'}, []), |
712 {'VR': 'table0.C0', 'X.creation_date': 'table0.C0'}, []), |
713 ('FetchStep', [('Any V,VR WHERE V creation_date VR, V is Card', |
713 ('FetchStep', [('Any V,VR WHERE V creation_date VR, V is Card', |
714 [{'VR': 'Datetime', 'V': 'Card'}])], |
714 [{'VR': 'Datetime', 'V': 'Card'}])], |
1347 ]) |
1347 ]) |
1348 |
1348 |
1349 def test_attr_unification_neq_1(self): |
1349 def test_attr_unification_neq_1(self): |
1350 self._test('Any X,Y WHERE X is Bookmark, Y is Card, X creation_date D, Y creation_date > D', |
1350 self._test('Any X,Y WHERE X is Bookmark, Y is Card, X creation_date D, Y creation_date > D', |
1351 [('FetchStep', |
1351 [('FetchStep', |
1352 [('Any Y,D WHERE Y creation_date > D, Y is Card', |
1352 [('Any Y,D WHERE Y creation_date D, Y is Card', |
1353 [{'D': 'Datetime', 'Y': 'Card'}])], |
1353 [{'D': 'Datetime', 'Y': 'Card'}])], |
1354 [self.cards,self.system], None, |
1354 [self.cards,self.system], None, |
1355 {'D': 'table0.C1', 'Y': 'table0.C0', 'Y.creation_date': 'table0.C1'}, []), |
1355 {'D': 'table0.C1', 'Y': 'table0.C0', 'Y.creation_date': 'table0.C1'}, []), |
1356 ('OneFetchStep', |
1356 ('OneFetchStep', |
1357 [('Any X,Y WHERE X creation_date D, Y creation_date > D, X is Bookmark, Y is Card', |
1357 [('Any X,Y WHERE X creation_date D, Y creation_date > D, X is Bookmark, Y is Card', |