示例#1
0
 def test_sorted_with_fields(self):
   expected_sql = 'SELECT f1,f2 FROM (%s) ORDER BY f1 LIMIT 5' % TestCases.BASE_SQL
   self._apply_sampling(Sampling.sorted('f1', fields=['f1', 'f2']), expected_sql)
示例#2
0
 def test_sorted_with_fields(self):
   expected_sql = 'SELECT f1,f2 FROM (%s) ORDER BY f1 LIMIT 5' % TestCases.BASE_SQL
   self._apply_sampling(Sampling.sorted('f1', fields=['f1', 'f2']), expected_sql)
示例#3
0
 def test_sorted_descending(self):
   expected_sql = 'SELECT * FROM (%s) ORDER BY f1 DESC LIMIT 5' % TestCases.BASE_SQL
   self._apply_sampling(Sampling.sorted('f1', ascending=False), expected_sql)
示例#4
0
 def test_sorted_descending(self):
   expected_sql = 'SELECT * FROM (%s) ORDER BY f1 DESC LIMIT 5' % TestCases.BASE_SQL
   self._apply_sampling(Sampling.sorted('f1', ascending=False), expected_sql)