ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/Genquire/gq_local.cfg_example
Revision: 1.4
Committed: Tue Apr 22 16:29:56 2003 UTC (13 years, 3 months ago) by markw
Branch: MAIN
CVS Tags: Release4, HEAD
Changes since 1.3: +4 -4 lines
Log Message:
various changes to get everything working again

Line File contents
1 # any cfg file must return a valid Context object
2 # based on whatever data source is being configured.
3 # see the AdaptorLayer documentation for details on
4 # how to construct your own Context object and adaptor layer
5 # for your own datasource.
6
7 # ALL METHODS OF Context.pm and ContextI must be available!
8
9 # The variables $Username, $Password, $IPAddress, and/or $Filename
10 # may be set here, and the values will appear in the appropriate
11 # box on the opening genquire GUI. This is FYI only!! Modifying
12 # their values from the GUI makes **no difference** to the final connection parameters,
13 # since the final Context object is created here!
14
15 $Username = "root";
16 $Password = "";
17 $IPAddress = "localhost";
18 $Filename = "";
19
20
21 $Default_DB = "genquire";
22
23 # note that DbObj is not an absolute requirement for all Context objects
24 # we use it in the Genquire_local adaptor layer because it is useful...
25 # you will probably want to have something like DbObj (call it what you wish)
26 # as the test of database or flat-file availability/successful connection.
27
28 $dbobj = GQ::Server::DB::DbObj->new($Username, $Password, $Default_DB, $IPAddress);
29 if ($dbobj) { #successful connection
30 $context=GQ::Server::DB::Context->new($dbobj) # not all Context objects will require $dbobj for initialization!
31 } else {
32 die "failed to connect to local Genquire database to extract organism list";
33 }