Changeset 23485 for main/trunk/greenstone2/perllib/dbutil.pm
- Timestamp:
- 2010-12-14T16:16:48+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/dbutil.pm
r23448 r23485 214 214 } 215 215 } 216 217 sub read_infodb_rawentry 218 { 219 my $infodb_type = shift(@_); 220 my $infodb_file_path = shift(@_); 221 my $infodb_key = shift(@_); 222 223 224 # !! TEMPORARY: Slow and naive implementation that just reads the entire file and picks out the one value 225 # !! This will soon be replaced with database-specific versions that will use dbget etc. 226 my $infodb_map = {}; 227 &read_infodb_file($infodb_type, $infodb_file_path, $infodb_map); 228 229 return $infodb_map->{$infodb_key}; 230 } 231 216 232 217 233 sub read_infodb_entry … … 248 264 249 265 250 251 # !! TEMPORARY: Slow and naive implementation that just reads the entire file and picks out the one value 252 # !! This will soon be replaced with database-specific versions that will use dbget etc. 253 my $infodb_map = {}; 254 &read_infodb_file($infodb_type, $infodb_file_path, $infodb_map); 255 256 my $infodb_rec = &dbutil::convert_infodb_string_to_hash($infodb_map->{$infodb_key}); 266 # rawentry above is currently naive implementation 267 my $raw_string = read_infodb_rawentry($infodb_type, $infodb_file_path, $infodb_key); 268 my $infodb_rec = &dbutil::convert_infodb_string_to_hash($raw_string); 257 269 258 270 return $infodb_rec;
Note:
See TracChangeset
for help on using the changeset viewer.