X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql.lisp;h=32cc98d55c5c2bbdec776000392fb1962ba9d063;hb=75862479bf0f237767673e4df2d9dc2cb45ccbee;hp=53c98e2c238a0ee32ce99807c010249b9b470338;hpb=cba592c185ee1b2e4eedc4aaa531495da79d897e;p=umlisp.git diff --git a/sql.lisp b/sql.lisp index 53c98e2..32cc98d 100644 --- a/sql.lisp +++ b/sql.lisp @@ -8,7 +8,7 @@ ;;;; Created: Apr 2000 ;;;; ;;;; This file, part of UMLisp, is -;;;; Copyright (c) 2000-2010 by Kevin M. Rosenberg, M.D. +;;;; Copyright (c) 2000-2012 by Kevin M. Rosenberg, M.D. ;;;; ;;;; UMLisp users are granted the rights to distribute and use this software ;;;; as governed by the terms of the GNU General Public License. @@ -16,12 +16,15 @@ (in-package #:umlisp) -(defvar +umls-sql-map+ +(defparameter +umls-sql-map+ '((:2004aa . "KUMLS2004AA") (:2006ac . "KUMLS2006AC") (:2006ad . "MTS2006AD") - (:2009ab . "MTS2009AB"))) -(defvar +default-umls-db+ "MTS2009AB") + (:2009ab . "MTS2009AB") + (:2010aa . "MTS2010AA_ALL") + (:2011aa . "UMLS2011AA") + (:2012aa . "MTS2012AA_ALL"))) +(defvar +default-umls-db+ "MTS2012AA_ALL") (defun lookup-db-name (db) (cdr (assoc (ensure-keyword db) +umls-sql-map+))) @@ -75,8 +78,11 @@ (defun sql-connect () "Connect to UMLS database, automatically used pooled connections" - (clsql:connect (umls-connection-spec) - :database-type *umls-sql-type* :pool t)) + (let ((db (clsql:connect (umls-connection-spec) + :database-type *umls-sql-type* + :encoding :utf-8 + :pool t))) + db)) (defun sql-disconnect (conn) "Disconnect from UMLS database, but put connection back into pool"