summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/mysql.py
diff options
context:
space:
mode:
authorJonathan Ellis <jbellis@gmail.com>2007-07-29 04:23:32 +0000
committerJonathan Ellis <jbellis@gmail.com>2007-07-29 04:23:32 +0000
commitcbb9e7f191b5bedf7ef7ee53244fda8ab9d4d46b (patch)
treeb5eba1ed8277345dfd4378d8ac3d454c8630d77e /lib/sqlalchemy/databases/mysql.py
parent38e87937594ff02951f472dc597bd95aefc6a84c (diff)
downloadsqlalchemy-cbb9e7f191b5bedf7ef7ee53244fda8ab9d4d46b.tar.gz
add table_names() for mysql. maybe it works.
Diffstat (limited to 'lib/sqlalchemy/databases/mysql.py')
-rw-r--r--lib/sqlalchemy/databases/mysql.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py
index 26800e32b..859846636 100644
--- a/lib/sqlalchemy/databases/mysql.py
+++ b/lib/sqlalchemy/databases/mysql.py
@@ -1091,6 +1091,10 @@ class MySQLDialect(ansisql.ANSIDialect):
connection.execute('SELECT DATABASE()').scalar()
return name
+ def table_names(self, connection, schema):
+ s = "SHOW TABLES"
+ return [row[0] for row in connection.execute(s)]
+
def has_table(self, connection, table_name, schema=None):
# SHOW TABLE STATUS LIKE and SHOW TABLES LIKE do not function properly
# on macosx (and maybe win?) with multibyte table names.