r3334: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 7 Nov 2002 23:10:25 +0000 (23:10 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 7 Nov 2002 23:10:25 +0000 (23:10 +0000)
debian/changelog
package.lisp
sql-classes.lisp

index 12e7cfc7dc0e9c04bd90c34030118dd96ef8ad8f..a78249a467478e3060c737b67162b935daaf836f 100644 (file)
@@ -1,3 +1,9 @@
+cl-umlisp (1.3-1) unstable; urgency=low
+
+  * Add map-ucon-all function
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Thu,  7 Nov 2002 16:07:00 -0700
+
 cl-umlisp (1.2.1-2) unstable; urgency=low
 
   * Fix print-object
index ec19fb0c24d3ed083962639c935183d5da4c1112..e8c40982d64a5f4839fc7d56e30d093ed634ab16 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2000
 ;;;;
-;;;; $Id: package.lisp,v 1.9 2002/11/04 19:33:40 kevin Exp $
+;;;; $Id: package.lisp,v 1.10 2002/11/07 23:08:00 kevin Exp $
 ;;;;
 ;;;; This file, part of UMLisp, is
 ;;;;    Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D.
@@ -70,6 +70,7 @@
    #:find-ucon-cuisui
    #:find-ucon-str
    #:find-ucon-all
+   #:map-ucon-all
    #:find-uterm-cui
    #:find-uterm-lui
    #:find-uterm-cuilui
index 60eeb23389809e16ae3a3feb29b3125c09b06408..0718c808f7cb101db3c68b727926a7e190bdc86d 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2000
 ;;;;
-;;;; $Id: sql-classes.lisp,v 1.6 2002/10/18 03:57:39 kevin Exp $
+;;;; $Id: sql-classes.lisp,v 1.7 2002/11/07 23:08:00 kevin Exp $
 ;;;;
 ;;;; This file, part of UMLisp, is
 ;;;;    Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D.
        ls
        :database db))))
 
+(defun map-ucon-all (fn &key (srl *current-srl*))
+  "Return list of all ucon's"
+  (let ((ls "select distinct CUI,KPFSTR,KCUILRL from MRCON"))
+    (when srl
+      (string-append ls (format nil " where KCUILRL <= ~d" srl)))
+    (string-append ls " order by CUI asc")
+    (with-sql-connection (db)
+      (clsql:map-query 
+       nil
+       #'(lambda (cui pfstr cuilrl)
+          (funcall fn
+                   (make-instance 'ucon :cui (ensure-integer cui)
+                                  :pfstr pfstr
+                                  :lrl (ensure-integer cuilrl))))
+       ls
+       :database db))))
 
 
 (defun find-udef-cui (cui &key (srl *current-srl*))