[Bio] / Sprout / ERDBLoader.pl Repository:
ViewVC logotype

Diff of /Sprout/ERDBLoader.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9, Mon Mar 23 19:34:35 2009 UTC revision 1.10, Mon May 4 18:49:49 2009 UTC
# Line 113  Line 113 
113    
114  =item DBD  =item DBD
115    
116  Name of the DBD file. If specified, the DBD must be in the main FIG directory  Fully-qualified name of the DBD file. This option allows the use of an alternate
 (specified in C<$FIG_Config::fig>). This option allows the use of an alternate  
117  DBD during load so that access to the database by other processes is not  DBD during load so that access to the database by other processes is not
118  compromised.  compromised.
119    
# Line 125  Line 124 
124  creating a new NMPDR: we can yank in the data from the previous database while  creating a new NMPDR: we can yank in the data from the previous database while
125  waiting for the new load files to be generated.  waiting for the new load files to be generated.
126    
127    =item dbName
128    
129    SQL name of the target database. If not specified, the default name is used.
130    This option allows you to specify a backup or alternate database that can
131    be loaded without compromising the main database.
132    
133  =back  =back
134    
135  =cut  =cut
# Line 132  Line 137 
137  # Get the command-line options and parameters.  # Get the command-line options and parameters.
138  my ($options, @parameters) = StandardSetup([qw(ERDBLoadGroup ERDB Stats) ],  my ($options, @parameters) = StandardSetup([qw(ERDBLoadGroup ERDB Stats) ],
139                                             {                                             {
140                                                  dbName => ["", "if specified, the SQL name of the target database"],
141                                                clear => ["", "overwrite existing load files if sections are present"],                                                clear => ["", "overwrite existing load files if sections are present"],
142                                                sanityCheck => ["", "don't load, trace contents of first N load file records instead"],                                                sanityCheck => ["", "don't load, trace contents of first N load file records instead"],
143                                                trace => ["2", "tracing level"],                                                trace => ["2", "tracing level"],
# Line 148  Line 154 
154  eval {  eval {
155      # Get the parameters.      # Get the parameters.
156      my ($database, @groups) = @parameters;      my ($database, @groups) = @parameters;
     # Check for an alternate DBD.  
     my $altDBD = ($options->{DBD} ? "$FIG_Config::fig/$options->{DBD}" : undef);  
157      # Connect to the database and get its load directory.      # Connect to the database and get its load directory.
158      my $erdb = ERDB::GetDatabase($database, $altDBD);      my $erdb = ERDB::GetDatabase($database, undef, %$options);
159      # Fix the group list.      # Fix the group list.
160      my @realGroups = ERDBLoadGroup::ComputeGroups($erdb, \@groups);      my @realGroups = ERDBLoadGroup::ComputeGroups($erdb, \@groups);
161      # Get the source object and load directory for this database.      # Get the source object and load directory for this database.

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3