diff base/database/database-connect.lisp @ 287:00d35eb70ef9

amuse-database-admin add implementation and dataset functionality Ignore-this: 787cc01acf2d6a58640fec017de16c17 darcs-hash:20090716145807-16a00-6fe5ad4a2b6252b2c1f3d109a16455bb32243965.gz
author j.forth <j.forth@gold.ac.uk>
date Thu, 16 Jul 2009 15:58:07 +0100
parents c591a5034da6
children 6a3adca16910
line wrap: on
line diff
--- a/base/database/database-connect.lisp	Sun May 24 20:39:56 2009 +0100
+++ b/base/database/database-connect.lisp	Thu Jul 16 15:58:07 2009 +0100
@@ -1,6 +1,16 @@
 (cl:in-package #:amuse-database-admin)
 
-(defparameter *amuse-database* nil)
+(defvar *amuse-database* nil
+  "The default AMuSE-wide database connection is assigned to this
+  variable. If for any reason, such as testing database interaction,
+  you do not wish to use the default database, this variable can be
+  shadowed locally within a particular backend package. For this to
+  actually work consistantly, all clsql database functions should
+  specify *amuse-database* explicitally as the :database argument. Not
+  doing this relies on the value of clsql:*default-database* being the
+  connection to the correct database, which in most cases will
+  actually be fine so long as you are not connecting to different
+  databases.")
 
 (defun connect-to-database (&key (database-name "amuse") username
 			    use-tunnel (make-default t))