mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-05-17 06:07:27 -04:00
Finish table_names.
This commit is contained in:
@@ -1092,8 +1092,10 @@ class MySQLDialect(ansisql.ANSIDialect):
|
||||
return name
|
||||
|
||||
def table_names(self, connection, schema):
|
||||
s = "SHOW TABLES"
|
||||
return [row[0] for row in connection.execute(s)]
|
||||
charset = self._detect_charset(connection)
|
||||
rp = connection.execute("SHOW TABLES FROM %s" %
|
||||
self.preparer().quote_identifier(schema))
|
||||
return [row[0] for row in _compat_fetchall(rp, charset=charset)]
|
||||
|
||||
def has_table(self, connection, table_name, schema=None):
|
||||
# SHOW TABLE STATUS LIKE and SHOW TABLES LIKE do not function properly
|
||||
|
||||
Reference in New Issue
Block a user