X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql.lisp;h=1dfbd68d19bb20082ae6a1cae8d6da66a1e1d167;hb=1b5b2e75a888e011706359e341b622a22f2023ea;hp=ef3be08ee04b4cd16cb7cf089fbab9a2dadb214f;hpb=48b70ea69d92b01f3e3795855581f8af8869b01f;p=umlisp.git diff --git a/sql.lisp b/sql.lisp index ef3be08..1dfbd68 100644 --- a/sql.lisp +++ b/sql.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: sql.lisp,v 1.5 2002/10/16 16:05:23 kevin Exp $ +;;;; $Id: sql.lisp,v 1.7 2002/10/18 05:18:43 kevin Exp $ ;;;; ;;;; This file, part of UMLisp, is ;;;; Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D. @@ -104,25 +104,3 @@ (defun mutex-sql-query (cmd &key (types :auto)) (with-mutex-sql (conn) (sql-query cmd conn :types types))) - - - -(defun make-usrl () - (with-sql-connection (conn) - (sql-execute "drop table if exists USRL" conn) - (sql-execute "create table USRL (sab varchar(80), srl integer)" conn) - (dolist (tuple (mutex-sql-query "select distinct SAB,SRL from MRSO order by SAB asc")) - (sql-execute (format nil "insert into USRL (sab,srl) values ('~a',~d)" - (car tuple) (ensure-integer (cadr tuple))) - conn))) - (find-usrl-all)) - -(defun find-usrl-all () - (let ((usrls '()) - (tuples (mutex-sql-query "select SAB,SRL from USRL order by SAB desc"))) - (dolist (tuple tuples) - (push (make-instance 'usrl :sab (nth 0 tuple) - :srl (ensure-integer (nth 1 tuple))) usrls)) - usrls)) - -