X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=db-mysql%2Fmysql-objects.lisp;h=015edbb6501791e3a45f82889f10ffc6f7ebfe9c;hb=4121952d2aa95c8611bf70b25b7772b5867c7666;hp=ddd6af22452656810c5365a417148f8e7e82c3c6;hpb=d80d8b58af5e3074bca3e8830a04efb2578c2f11;p=clsql.git diff --git a/db-mysql/mysql-objects.lisp b/db-mysql/mysql-objects.lisp index ddd6af2..015edbb 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$ -;;;; ;;;; 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. @@ -16,40 +14,45 @@ (in-package #:clsql-mysql) (defmethod database-get-type-specifier ((type (eql 'wall-time)) args database - (db-type (eql :mysql))) + (db-type (eql :mysql))) (declare (ignore args database)) "DATETIME") (defmethod database-get-type-specifier ((type (eql 'smallint)) args database - (db-type (eql :mysql))) + (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))) + (db-type (eql :mysql))) (declare (ignore args database)) "TINYINT") (defmethod database-output-sql-as-type ((type (eql 'boolean)) val database - (db-type (eql :mysql))) + (db-type (eql :mysql))) (declare (ignore database)) (if val 1 0)) (defmethod database-output-sql-as-type ((type (eql 'generalized-boolean)) val database - (db-type (eql :mysql))) + (db-type (eql :mysql))) (declare (ignore database)) (if val 1 0)) (defmethod read-sql-value (val (type (eql 'boolean)) database - (db-type (eql :mysql))) - (declare (ignore database)) + (db-type (eql :mysql))) + (declare (ignore database)) (etypecase val (string (if (string= "0" val) nil t)) (integer (if (zerop val) nil t)))) (defmethod read-sql-value (val (type (eql 'generalized-boolean)) database - (db-type (eql :mysql))) - (declare (ignore database)) + (db-type (eql :mysql))) + (declare (ignore database)) (etypecase val (string (if (string= "0" val) nil t)) (integer (if (zerop val) nil t))))