X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Fdatabase.lisp;h=83fe7d6a6df739e24dbedbf88fd2beecf4a0aab2;hb=be383802fc1f47547eef6d57945023ff71d45657;hp=14bcdc8a02d47453b283400162e794c7df9c913a;hpb=b0aeb15f9ab4059792ffef6b819bf795755ff8b4;p=clsql.git diff --git a/sql/database.lisp b/sql/database.lisp index 14bcdc8..83fe7d6 100644 --- a/sql/database.lisp +++ b/sql/database.lisp @@ -166,7 +166,7 @@ from a pool it will be released to this pool." (let ((database (find-database database :errorp (and database error)))) (when database (if (conn-pool database) - (with-process-lock ((conn-pool-lock pool) "Delete from pool") + (with-process-lock ((conn-pool-lock (conn-pool database)) "Delete from pool") (when (release-to-pool database) (setf *connected-databases* (delete database *connected-databases*)) (when (eq database *default-database*) @@ -280,28 +280,28 @@ database is printed." (print-separator total-size)))) (values))) -(defun create-database (connection-spec &key database-type) +(defun create-database (connection-spec &key (database-type *default-database-type*)) "This function creates a database in the database system specified by DATABASE-TYPE." (when (stringp connection-spec) (setq connection-spec (string-to-list-connection-spec connection-spec))) (database-create connection-spec database-type)) -(defun probe-database (connection-spec &key database-type) +(defun probe-database (connection-spec &key (database-type *default-database-type*)) "This function tests for the existence of a database in the database system specified by DATABASE-TYPE." (when (stringp connection-spec) (setq connection-spec (string-to-list-connection-spec connection-spec))) (database-probe connection-spec database-type)) -(defun destroy-database (connection-spec &key database-type) +(defun destroy-database (connection-spec &key (database-type *default-database-type*)) "This function destroys a database in the database system specified by DATABASE-TYPE." (when (stringp connection-spec) (setq connection-spec (string-to-list-connection-spec connection-spec))) (database-destroy connection-spec database-type)) -(defun list-databases (connection-spec &key database-type) +(defun list-databases (connection-spec &key (database-type *default-database-type*)) "This function returns a list of databases existing in the database system specified by DATABASE-TYPE." (when (stringp connection-spec)