Ejemplo n.º 1
0
 def test_do_not_add_hints_to_query_if_not_supported_by_dialect(self):
     query = MySQLQuery.from_('table').select('*')
     query_hint = add_hints([query], 'test_hint')
     self.assertEqual('SELECT * FROM `table`', str(query_hint[0]))
Ejemplo n.º 2
0
 def test_do_not_add_hints_to_query_if_no_hint_string_supplied(self):
     query = VerticaQuery.from_('table').select('*')
     query_hint = add_hints([query], hint=None)
     self.assertEqual('SELECT * FROM "table"', str(query_hint[0]))
Ejemplo n.º 3
0
 def test_add_hint_to_query_if_supported_by_dialect_and_hint_is_set(self):
     query = VerticaQuery.from_('table').select('*')
     query_hint = add_hints([query], 'test_hint')
     self.assertEqual('SELECT /*+label(test_hint)*/ * FROM "table"',
                      str(query_hint[0]))