Esempio n. 1
0
 def test_force_index_with_object(self):
     select_query = self.select(
         condition.force_index(models.UnittestModel.test_index))
     expected_sql = 'FROM table@{FORCE_INDEX=test_index}'
     self.assertEndsWith(select_query.sql(), expected_sql)
Esempio n. 2
0
 def test_count_allows_force_index(self):
     force_index = condition.force_index('test_index')
     count_query = query.CountQuery(models.UnittestModel, [force_index])
     sql = count_query.sql()
     expected_sql = 'SELECT COUNT(*) FROM table@{FORCE_INDEX=test_index}'
     self.assertEqual(expected_sql, sql)
Esempio n. 3
0
 def test_force_index(self):
     select_query = self.select(condition.force_index('test_index'))
     expected_sql = 'FROM table@{FORCE_INDEX=test_index}'
     self.assertEndsWith(select_query.sql(), expected_sql)