From 29e203446b2275fd2353642510cd4b2903d07d1c Mon Sep 17 00:00:00 2001 From: Russ Tyndall Date: Thu, 20 Jun 2013 14:39:50 -0400 Subject: [PATCH] Found and refactored a way some more eql specified methods of database-get-type-specifier in mysql --- ChangeLog | 5 +++++ db-mysql/mysql-objects.lisp | 26 ++++++++------------------ 2 files changed, 13 insertions(+), 18 deletions(-) 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))) -- 2.34.1