diff --git a/src/sources/mysql/mysql.lisp b/src/sources/mysql/mysql.lisp index 1710c8c..7cc9555 100644 --- a/src/sources/mysql/mysql.lisp +++ b/src/sources/mysql/mysql.lisp @@ -235,13 +235,7 @@ Illegal ~a character starting at position ~a~@[: ~a~].~%" (defun apply-decoding-as-filters (table-name filters) "Return a generialized boolean which is non-nil only if TABLE-NAME matches one of the FILTERS." - (flet ((apply-filter (filter) - ;; we close over table-name here. - (typecase filter - (string (string-equal filter table-name)) - (list (destructuring-bind (type val) filter - (ecase type - (:regex (cl-ppcre:scan val table-name)))))))) + (flet ((apply-filter (filter) (matches filter table-name))) (some #'apply-filter filters))) (defmethod instanciate-table-copy-object ((copy copy-mysql) (table table)) diff --git a/src/utils/catalog.lisp b/src/utils/catalog.lisp index 76a4857..c61ce8f 100644 --- a/src/utils/catalog.lisp +++ b/src/utils/catalog.lisp @@ -204,7 +204,7 @@ (defmethod sqltype-list ((table table) &key) "Return the list of sqltypes for SCHEMA." - (apply #'append (mapcar #'sqltype-list (table-column-list table)))) + (mapcar #'sqltype-list (table-column-list table))) (defmethod sqltype-list ((schema schema) &key) "Return the list of sqltypes for SCHEMA." @@ -215,7 +215,9 @@ (defmethod sqltype-list ((catalog catalog) &key) "Return the list of sqltypes for CATALOG." (remove-duplicates - (apply #'append (mapcar #'sqltype-list (catalog-schema-list catalog))) + (remove-if #'null + (apply #'append + (mapcar #'sqltype-list (catalog-schema-list catalog)))) :test #'string-equal :key #'sqltype-name)) (defmethod table-list ((schema schema) &key)