r4783: Auto commit for Debian build
[umlisp.git] / sql-classes.lisp
index b6abb486af5d54d9da189699f14d2d8ed4d21bf8..ad61636689ae9e92aab8ace1960a88356575930b 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Author:        Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2000
 ;;;;
-;;;; $Id: sql-classes.lisp,v 1.55 2003/05/03 22:45:23 kevin Exp $
+;;;; $Id: sql-classes.lisp,v 1.57 2003/05/03 22:48:55 kevin Exp $
 ;;;;
 ;;;; This file, part of UMLisp, is
 ;;;;    Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D.
@@ -33,7 +33,7 @@
                             &body body)
   (let ((value (gensym)))
     (if single
-       `(let ((,value where-value))
+       `(let ((,value ,where-value))
          (when ,value 
            (let ((tuple (car (umlisp-query ,table ,fields ,srl ,where-name ,value
                                            :lrl ,lrl :single ,single
@@ -42,7 +42,7 @@
              (when tuple
                (destructuring-bind ,fields tuple
                  ,@body)))))
-       `(let ((,value where-value))
+       `(let ((,value ,where-value))
          (when ,value 
            (loop for tuple in
                  (umlisp-query ,table ,fields ,srl ,where-name ,value
@@ -170,7 +170,7 @@ is OBJNAME from TABLE where WHERE-NAME field = WHERE-VALUE with FIELDS"
         (make-instance 'ucon :cui (ensure-integer cui)
                        :pfstr pfstr
                        :lrl (ensure-integer cuilrl)))
-     (query-string 'mrcon '(cui kpfstr kcuilrl) srl nil nil
+     (query-string-macro mrcon (cui kpfstr kcuilrl) srl nil nil
                   :order (cui asc) :distinct t)
      :database db)))
 
@@ -184,7 +184,7 @@ is OBJNAME from TABLE where WHERE-NAME field = WHERE-VALUE with FIELDS"
                  (make-instance 'ucon :cui (ensure-integer cui)
                                 :pfstr pfstr
                                 :lrl (ensure-integer cuilrl))))
-     (query-string 'mrcon '(cui kpfstr kcuilrl) srl nil nil :order (cui asc) :distinct t)
+     (query-string-macro mrcon (cui kpfstr kcuilrl) srl nil nil :order (cui asc) :distinct t)
      :database db)))
 
 
@@ -328,7 +328,7 @@ is OBJNAME from TABLE where WHERE-NAME field = WHERE-VALUE with FIELDS"
                          :stt stt
                          :lrl lrl
                          :str pfstr))
-       (query-string 'mrcon '(cui lui sui stt lrl kpfstr) srl nil nil :lrl lrl :distinct t
+       (query-string-macro mrcon (cui lui sui stt lrl kpfstr) srl nil nil :lrl lrl :distinct t
                     :order (sui asc))
        :database db)))