projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r9088: Automated commit for Debian build of clsql upstream-version-2.8.0
[clsql.git]
/
base
/
database.lisp
diff --git
a/base/database.lisp
b/base/database.lisp
index 953c40a3bc51779d74b4375a2292f04ea59c97f5..cc26d7119c517449b603ed41b654adeec3594017 100644
(file)
--- a/
base/database.lisp
+++ b/
base/database.lisp
@@
-181,7
+181,7
@@
if the database connection has been lost."
((or string list)
(let ((db (find-database database :errorp nil)))
(when (null db)
((or string list)
(let ((db (find-database database :errorp nil)))
(when (null db)
- (if (and database error
p
)
+ (if (and database error)
(error 'clsql-generic-error
:message
(format nil "Unable to find database with connection-spec ~A." database))
(error 'clsql-generic-error
:message
(format nil "Unable to find database with connection-spec ~A." database))
@@
-246,6
+246,10
@@
of full is NIL."
(setq connection-spec (string-to-list-connection-spec connection-spec)))
(database-destroy connection-spec database-type))
(setq connection-spec (string-to-list-connection-spec connection-spec)))
(database-destroy connection-spec database-type))
+(defun list-databases (connection-spec &key database-type)
+ (when (stringp connection-spec)
+ (setq connection-spec (string-to-list-connection-spec connection-spec)))
+ (database-list connection-spec database-type))
(defmacro with-database ((db-var connection-spec &rest connect-args) &body body)
"Evaluate the body in an environment, where `db-var' is bound to the
(defmacro with-database ((db-var connection-spec &rest connect-args) &body body)
"Evaluate the body in an environment, where `db-var' is bound to the