r11068: * clsql.asd: Add support for loop extensions for clisp. Support clisp...
[clsql.git] / sql / expressions.lisp
index 57afac1b391084aaf658ec4d3511d6573ceaeb2e..44cde13d4b57c6b271be8241b1597e017a23678b 100644 (file)
@@ -589,8 +589,8 @@ uninclusive, and the args from that keyword to the end."
                         (string-equal (slot-value a 'alias)
                                       (slot-value b 'alias))
                         t)
-                    (string-equal (symbol-name (slot-value a 'name))
-                                  (symbol-name (slot-value b 'name))))))
+                    (string-equal (sql-escape (slot-value a 'name))
+                                  (sql-escape (slot-value b 'name))))))
         (typecase from
           (list (output-sql (apply #'vector
                                    (remove-duplicates from
@@ -898,6 +898,15 @@ 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))))
+        (when val
+          (typecase val
+            (string (format nil "'~A'" val))
+            (integer (format nil "~A" val)))))
+    "'Y'"))
+
+#+nil(defmethod database-output-sql ((tee (eql t)) database)
   (declare (ignore database))
   "'Y'")