Changeset 22485 for main/trunk/greenstone2/perllib/dbutil.pm
- Timestamp:
- 2010-07-22T18:55:18+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/dbutil.pm
r22121 r22485 144 144 } 145 145 146 # This function, conceptually, would be better structured if it didn't 147 # use return statements, as the database methods it calls do not 148 # themselves return anything. 149 # Note: if doing this, then the GDBM lines of code should be moved into 150 # an 'else' clause 146 151 147 152 sub read_infodb_file … … 177 182 } 178 183 184 sub read_infodb_keys 185 { 186 my $infodb_type = shift(@_); 187 my $infodb_file_path = shift(@_); 188 my $infodb_map = shift(@_); 189 190 if ($infodb_type eq "sqlite") 191 { 192 require dbutil::sqlite; 193 &dbutil::sqlite::read_infodb_keys($infodb_file_path, $infodb_map, @_); 194 } 195 elsif ($infodb_type eq "gdbm-txtgz") 196 { 197 require dbutil::gdbmtxtgz; 198 &dbutil::gdbmtxtgz::read_infodb_keys($infodb_file_path, $infodb_map, @_); 199 } 200 elsif ($infodb_type eq "jdbm") 201 { 202 require dbutil::jdbm; 203 &dbutil::jdbm::read_infodb_keys($infodb_file_path, $infodb_map, @_); 204 } 205 elsif ($infodb_type eq "mssql") 206 { 207 require dbutil::mssql; 208 &dbutil::mssql::read_infodb_keys($infodb_file_path, $infodb_map, @_); 209 } 210 else { 211 # Use GDBM if the infodb type is empty or not one of the values above 212 require dbutil::gdbm; 213 &dbutil::gdbm::read_infodb_keys($infodb_file_path, $infodb_map, @_); 214 } 215 } 179 216 180 217 sub read_infodb_entry
Note:
See TracChangeset
for help on using the changeset viewer.