MCPcopy Index your code
hub / github.com/davispuh/MySQL-for-Python-3 / table_exists

Method table_exists

tests/capabilities.py:46–52  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

44 self.assertFalse(orphans, "%d orphaned objects found after deleting connection" % orphans)
45
46 def table_exists(self, name):
47 try:
48 self.cursor.execute('select * from %s where 1=0' % name)
49 except:
50 return False
51 else:
52 return True
53
54 def quote_identifier(self, ident):
55 return '"%s"' % ident

Callers 1

new_table_nameMethod · 0.95

Calls 1

executeMethod · 0.80

Tested by

no test coverage detected