Change MySQL list-tables function not to include views.

This commit is contained in:
Dimitri Fontaine 2013-11-22 10:55:38 +01:00
parent 6a6684bd8b
commit 74cabeb6f5

View File

@ -70,7 +70,13 @@
(progn
(cl-mysql:use dbname)
;; that returns a pretty weird format, process it
(mapcan #'identity (caar (cl-mysql:list-tables))))
(loop for (table-name)
in (caar (cl-mysql:query (format nil "
select table_name
from information_schema.tables
where table_schema = '~a' and table_type = 'BASE TABLE'
order by table_name" dbname)))
collect table-name))
;; free resources
(cl-mysql:disconnect)))