X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=db-mysql%2Fmysql-objects.lisp;h=0a9e7b324e1c1bd8c46cc1f40dc8d15fdfaf1dd7;hb=f2e97f7b39c1cf82b6f3d1cec9362e551761549e;hp=bbe52324fe2d0466849e51f49c741f5c02dac7ca;hpb=7308bdf188da6424e615ca14096ef53cfb845a90;p=clsql.git diff --git a/db-mysql/mysql-objects.lisp b/db-mysql/mysql-objects.lisp index bbe5232..0a9e7b3 100644 --- a/db-mysql/mysql-objects.lisp +++ b/db-mysql/mysql-objects.lisp @@ -6,8 +6,6 @@ ;;;; Purpose: CLSQL Object layer for MySQL ;;;; Created: May 2004 ;;;; -;;;; $Id: mysql-sql.lisp 9403 2004-05-19 23:46:45Z kevin $ -;;;; ;;;; CLSQL users are granted the rights to distribute and use this software ;;;; as governed by the terms of the Lisp Lesser GNU Public License ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. @@ -15,19 +13,13 @@ (in-package #:clsql-mysql) -(defmethod database-get-type-specifier ((type (eql 'wall-time)) args database - (db-type (eql :mysql))) - (declare (ignore args database)) - "DATETIME") - -(defmethod database-output-sql-as-type ((type (eql 'boolean)) val database - (db-type (eql :mysql))) - (declare (ignore database)) - (if val 1 0)) +(defmethod database-get-type-specifier ((type symbol) args database + (db-type (eql :mysql))) + (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))) - (declare (ignore database)) - (etypecase val - (string (if (string= "0" val) nil t)) - (integer (if (zerop val) nil t))))