Found and refactored a way some more eql specified methods of
[clsql.git] / db-mysql / mysql-objects.lisp
index 93a802f762ca3be7cefaa5229e0e894097373610..b3baf30c79a45dafdaa174f285118fbabde5b1d1 100644 (file)
 
 (in-package #:clsql-mysql)
 
-(defmethod database-get-type-specifier ((type (eql 'wall-time)) args database
+(defmethod database-get-type-specifier ((type symbol) args database
                                         (db-type (eql :mysql)))
-  (declare (ignore args database))
-  "DATETIME")
-
-(defmethod database-get-type-specifier ((type (eql 'smallint)) args database
-                                        (db-type (eql :mysql)))
-  (declare (ignore args database))
-  "SMALLINT")
-
-(defmethod database-get-type-specifier ((type (eql 'mediumint)) args database
-                                        (db-type (eql :mysql)))
-  (declare (ignore args database))
-  "MEDIUMINT")
-
-(defmethod database-get-type-specifier ((type (eql 'tinyint)) args database
-                                        (db-type (eql :mysql)))
-  (declare (ignore args database))
-  "TINYINT")
+  (declare (ignore args database db-type))
+  (case type
+    (wall-time "DATETIME")
+    (tinyint "TINYINT")
+    (smallint "SMALLINT")
+    (mediumint "MEDIUMINT")
+    (t (call-next-method))))
 
 (defmethod read-sql-value (val (type (eql 'boolean)) database
                            (db-type (eql :mysql)))