+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
;;;; 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.
#:find-ucon-cuisui
#:find-ucon-str
#:find-ucon-all
+ #:map-ucon-all
#:find-uterm-cui
#:find-uterm-lui
#:find-uterm-cuilui
;;;; 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*))