MCPcopy Create free account
hub / github.com/PyMySQL/mysqlclient / table_exists

Method table_exists

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

Source from the content-addressed store, hash-verified

46 )
47
48 def table_exists(self, name):
49 try:
50 self.cursor.execute("select * from %s where 1=0" % name)
51 except Exception:
52 return False
53 else:
54 return True
55
56 def quote_identifier(self, ident):
57 return '"%s"' % ident

Callers 1

new_table_nameMethod · 0.95

Calls 1

executeMethod · 0.80

Tested by

no test coverage detected