From: Russ Tyndall Date: Thu, 20 Jun 2013 18:39:50 +0000 (-0400) Subject: Found and refactored a way some more eql specified methods of X-Git-Tag: v6.5.0~20 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=29e203446b2275fd2353642510cd4b2903d07d1c Found and refactored a way some more eql specified methods of database-get-type-specifier in mysql --- diff --git a/ChangeLog b/ChangeLog index e4aae09..8dbbf35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-06-19 Russ Tyndall + * sql/mysql-objects.lisp + Found and refactored a way some more eql specified methods of + database-get-type-specifier in mysql + 2013-06-18 Russ Tyndall * sql/oodml.lisp, sql/mysql-objects.lisp refactored database-output-sql-as-type in a similar fashion to diff --git a/db-mysql/mysql-objects.lisp b/db-mysql/mysql-objects.lisp index 93a802f..b3baf30 100644 --- a/db-mysql/mysql-objects.lisp +++ b/db-mysql/mysql-objects.lisp @@ -13,25 +13,15 @@ (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)))