+3 May 2004 Kevin Rosenberg (kevin@rosenberg.net)
+ * Version 2.10.7
+ * db-odbc/odbc-dbi.lisp: Convert TINYINT to integers when
+ result-types is :auto
+ * sql/objects.lisp: Properly handled writing/reading Boolean
+ values from SQL database when retrieving objects.
+ * test/test-fdml.lisp: Add another test for boolean results
+ * test/utils.lisp: Fix incorrect declaration
+
2 May 2004 Marcus Pearce (m.t.pearce@city.ac.uk)
* Version 2.10.6
* sql/generics.lisp: add generic function for SELECT.
backends showing autogenerated primary key in different ways.
* Test New universal and bigint types, add tests for other types such as duration and money
* Large object testing
-
+* Test instance slot values when SELECT called for objects
+
COMMONSQL SPEC
* Missing:
(#.odbc::$SQL_C_DOUBLE :double)
(#.odbc::$SQL_C_FLOAT :float)
(#.odbc::$SQL_C_SSHORT :short)
+ (#.odbc::$SQL_C_STINYINT :short)
(#.odbc::$SQL_BIGINT :short)
(t t))))
(t
- t)))))
+ t)))))
query)
(defun db-close-query (query &key drop-p)
+cl-sql (2.10.7-1) unstable; urgency=low
+
+ * New upstream
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Mon, 3 May 2004 09:50:27 -0600
+
cl-sql (2.10.6-1) unstable; urgency=low
* New upstream
(defmethod update-slot-with-null ((object standard-db-object)
slotname
slotdef)
- (let ((st (slot-type slotdef))
- (void-value (slot-value slotdef 'void-value)))
- (setf (slot-value object slotname) void-value)))
+ (setf (slot-value object slotname) (slot-value slotdef 'void-value)))
(defvar +no-slot-value+ '+no-slot-value+)
(prin1-to-string val)))
(defmethod database-output-sql-as-type ((type (eql 'boolean)) val database)
- (declare (ignore database))
- (if val "t" "f"))
+ (case (database-underlying-type database)
+ (:mysql
+ (if val 1 0))
+ (t
+ (if val "t" "f"))))
(defmethod database-output-sql-as-type ((type (eql 'string)) val database)
(declare (ignore database))
(float (read-from-string val)))
(defmethod read-sql-value (val (type (eql 'boolean)) database)
- (declare (ignore database))
- (equal "t" val))
+ (case (database-underlying-type database)
+ (:mysql
+ (etypecase val
+ (string (if (string= "0" val) nil t))
+ (integer (if (zerop val) nil t))))
+ (t
+ (equal "t" val))))
(defmethod read-sql-value (val (type (eql 'univeral-time)) database)
(declare (ignore database))
(values results (mapcar #'string-downcase field-names)))
((1 "Lenin" "t"))
("emplid" "last_name" "married"))
-
+
(deftest :fdml/select/14
(floatp (car (clsql:select [height] :from [employee] :where [= [emplid] 1]
:flatp t)))
t)
+(deftest :fdml/select/15
+ (clsql:select [married] :from [employee]
+ :where [= [emplid] 4]
+ :field-names nil)
+ (("f")))
+
;(deftest :fdml/select/11
; (clsql:select [emplid] :from [employee]
; :where [= [emplid] [any [select [companyid] :from [company]]]]