projects
/
umlisp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support new syntax of MySQL
[umlisp.git]
/
sql.lisp
diff --git
a/sql.lisp
b/sql.lisp
index 53c98e2c238a0ee32ce99807c010249b9b470338..3847d02492692f4d5da0c2ee85f87b0be93a937e 100644
(file)
--- a/
sql.lisp
+++ b/
sql.lisp
@@
-8,7
+8,7
@@
;;;; Created: Apr 2000
;;;;
;;;; This file, part of UMLisp, is
;;;; Created: Apr 2000
;;;;
;;;; This file, part of UMLisp, is
-;;;; Copyright (c) 2000-201
0
by Kevin M. Rosenberg, M.D.
+;;;; Copyright (c) 2000-201
2
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.
;;;;
;;;; 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,14
@@
(in-package #:umlisp)
(in-package #:umlisp)
-(def
va
r +umls-sql-map+
+(def
paramete
r +umls-sql-map+
'((:2004aa . "KUMLS2004AA")
(:2006ac . "KUMLS2006AC")
(:2006ad . "MTS2006AD")
'((:2004aa . "KUMLS2004AA")
(:2006ac . "KUMLS2006AC")
(:2006ad . "MTS2006AD")
- (:2009ab . "MTS2009AB")))
-(defvar +default-umls-db+ "MTS2009AB")
+ (:2009ab . "MTS2009AB")
+ (:2010aa . "MTS2010AA")
+ (:2012ab . "MTS2012AB")))
+(defvar +default-umls-db+ "MTS2012AA_ALL")
(defun lookup-db-name (db)
(cdr (assoc (ensure-keyword db) +umls-sql-map+)))
(defun lookup-db-name (db)
(cdr (assoc (ensure-keyword db) +umls-sql-map+)))
@@
-75,8
+77,11
@@
(defun sql-connect ()
"Connect to UMLS database, automatically used pooled connections"
(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"
(defun sql-disconnect (conn)
"Disconnect from UMLS database, but put connection back into pool"