projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r9739: 7 Jul 2004 Kevin Rosenberg <kevin@rosenberg.net>
[clsql.git]
/
db-mysql
/
mysql-objects.lisp
diff --git
a/db-mysql/mysql-objects.lisp
b/db-mysql/mysql-objects.lisp
index bbe52324fe2d0466849e51f49c741f5c02dac7ca..5ddad8b5d73817da2aaded534fb153b30e3f10ce 100644
(file)
--- a/
db-mysql/mysql-objects.lisp
+++ b/
db-mysql/mysql-objects.lisp
@@
-6,7
+6,7
@@
;;;; Purpose: CLSQL Object layer for MySQL
;;;; Created: May 2004
;;;;
;;;; Purpose: CLSQL Object layer for MySQL
;;;; Created: May 2004
;;;;
-;;;; $Id
: mysql-sql.lisp 9403 2004-05-19 23:46:45Z kevin
$
+;;;; $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
;;;;
;;;; CLSQL users are granted the rights to distribute and use this software
;;;; as governed by the terms of the Lisp Lesser GNU Public License
@@
-20,14
+20,31
@@
(declare (ignore args database))
"DATETIME")
(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-output-sql-as-type ((type (eql 'boolean)) val database
(db-type (eql :mysql)))
(declare (ignore database))
(if val 1 0))
(defmethod database-output-sql-as-type ((type (eql 'boolean)) val database
(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)))
+ (declare (ignore database))
+ (if val 1 0))
+
(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))))
(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))))
+
+(defmethod read-sql-value (val (type (eql 'generalized-boolean)) database
+ (db-type (eql :mysql)))
+ (declare (ignore database))
+ (etypecase val
+ (string (if (string= "0" val) nil t))
+ (integer (if (zerop val) nil t))))