Mercurial > hg > amuse
comparison 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 |
comparison
equal
deleted
inserted
replaced
286:d22c67dac97d | 287:00d35eb70ef9 |
---|---|
1 (cl:in-package #:amuse-database-admin) | 1 (cl:in-package #:amuse-database-admin) |
2 | 2 |
3 (defparameter *amuse-database* nil) | 3 (defvar *amuse-database* nil |
4 "The default AMuSE-wide database connection is assigned to this | |
5 variable. If for any reason, such as testing database interaction, | |
6 you do not wish to use the default database, this variable can be | |
7 shadowed locally within a particular backend package. For this to | |
8 actually work consistantly, all clsql database functions should | |
9 specify *amuse-database* explicitally as the :database argument. Not | |
10 doing this relies on the value of clsql:*default-database* being the | |
11 connection to the correct database, which in most cases will | |
12 actually be fine so long as you are not connecting to different | |
13 databases.") | |
4 | 14 |
5 (defun connect-to-database (&key (database-name "amuse") username | 15 (defun connect-to-database (&key (database-name "amuse") username |
6 use-tunnel (make-default t)) | 16 use-tunnel (make-default t)) |
7 "Well, slightly more secure I guess. Requires that an option file | 17 "Well, slightly more secure I guess. Requires that an option file |
8 exists containing connection-spec s-expressions. If no such file | 18 exists containing connection-spec s-expressions. If no such file |