diff base/database/database-connect.lisp @ 216:e1842efb1dd4

amuse-database-admin add implementation and dataset functionality Ignore-this: 787cc01acf2d6a58640fec017de16c17 darcs-hash:20090716145807-16a00-6fe5ad4a2b6252b2c1f3d109a16455bb32243965.gz committer: Jamie Forth <j.forth@gold.ac.uk>
author j.forth <j.forth@gold.ac.uk>
date Thu, 24 Feb 2011 11:23:18 +0000
parents 4d06910b6f0f
children 6a3adca16910
line wrap: on
line diff
--- a/base/database/database-connect.lisp	Thu Feb 24 11:23:18 2011 +0000
+++ b/base/database/database-connect.lisp	Thu Feb 24 11:23:18 2011 +0000
@@ -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))