r11067: * sql/expressions.lisp: Use database-output-as-type if value exists...
authorKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 30 Aug 2006 13:13:05 +0000 (13:13 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 30 Aug 2006 13:13:05 +0000 (13:13 +0000)
ChangeLog
sql/expressions.lisp

index 9aea50cbd06df993d473776d9e681bc6f311d2c3..113bc61d53fbf912a4efd77982848dda3bf121ae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,7 +12,8 @@
        * db-mysql/mysql-api.lisp: Remove old mysql C API functions that no
        longer exist in the mysql client library.
        * doc/ref-fdml.lisp: Correct default field-type.
-
+       * sql/expressions.lisp: Use database-output-as-type if value exists for boolean output
+       
 28 Aug 2006  Kevin Rosenberg <kevin@rosenberg.net>
        * Version 3.6.7
        * sql/oodml.lisp: Remove high debugging level declaration
index cd1a6d397bc9a2665bf0472a80d5d14aa563e602..5bce5d89c03e30d9b5118392b2d3f338aacd34e9 100644 (file)
@@ -898,6 +898,16 @@ uninclusive, and the args from that keyword to the end."
        database))))
 
 (defmethod database-output-sql ((tee (eql t)) database)
+  (if database
+      (let ((val (database-output-sql-as-type 'boolean t database (database-type database))))
+        (if val
+            (typecase val
+              (string val)
+              (t (format nil "~A" val)))
+          "'Y'"))
+    "'Y'"))
+
+#+nil(defmethod database-output-sql ((tee (eql t)) database)
   (declare (ignore database))
   "'Y'")