r4790: Auto commit for Debian build
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 4 May 2003 01:34:33 +0000 (01:34 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 4 May 2003 01:34:33 +0000 (01:34 +0000)
sql-classes.lisp

index 207d7001c822f1a12e5d663bbb2869f564a8c2f1..b04569f50bf376c1a77e3b1f6c425d82e9178c4f 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Author:        Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2000
 ;;;;
-;;;; $Id: sql-classes.lisp,v 1.63 2003/05/04 01:25:24 kevin Exp $
+;;;; $Id: sql-classes.lisp,v 1.64 2003/05/04 01:34:33 kevin Exp $
 ;;;;
 ;;;; This file, part of UMLisp, is
 ;;;;    Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D.
@@ -108,9 +108,17 @@ is OBJNAME from TABLE where WHERE-NAME field = WHERE-VALUE with FIELDS"
       ,%%fields
       ,@(when %%where (list %%where))
       ,@(when %%where
+             #+ignore
              `((if (numberp ,where-value)
                    (write-to-string ,where-value)
-                   (format nil ,(if like "'%~A%'" "'~A'") ,where-value))))
+                   (format nil ,(if like "'%~A%'" "'~A'") ,where-value)))
+             `((typecase ,where-value
+                 (number
+                  (write-to-string ,where-value))
+                 ((nil)
+                  " is null")
+                 (t
+                  (format nil ,(if like "'%~A%'" "'~A'") ,where-value)))))
       (if ,srl (concatenate 'string ,%%lrl (write-to-string ,srl)) "")
       ,@(when %%order (list %%order))
       ,@(when single (list " limit 1")))))