Changeset 17105
- Timestamp:
- 2008-08-29T15:19:56+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/dbutil.pm
r17104 r17105 38 38 return &open_infodb_write_handle_sqlite($infodb_file_path); 39 39 } 40 elsif ($infodb_type eq "gdbm") 41 { 42 return &open_infodb_write_handle_gdbm($infodb_file_path); 43 } 44 45 # Use text (gzipped) version ready for conversion to GDBM 46 # if the infodb type is empty or not one of the values above 47 return &open_infodb_write_handle_gdbm_txtgz($infodb_file_path); 40 elsif ($infodb_type eq "gdbm-txtgz") 41 { 42 return &open_infodb_write_handle_gdbm_txtgz($infodb_file_path); 43 } 44 45 # Use GDBM if the infodb type is empty or not one of the values above 46 return &open_infodb_write_handle_gdbm($infodb_file_path); 48 47 } 49 48 … … 58 57 return &close_infodb_write_handle_sqlite($infodb_handle); 59 58 } 60 elsif ($infodb_type eq "gdbm") 61 { 62 return &close_infodb_write_handle_gdbm($infodb_handle); 63 } 64 65 # Use text (gzipped) version ready for conversion to GDBM 66 # if the infodb type is empty or not one of the values above return 67 &close_infodb_write_handle_gdbm_txtgz($infodb_handle); 59 elsif ($infodb_type eq "gdbm-txtgz") 60 { 61 return &close_infodb_write_handle_gdbm_txtgz($infodb_handle); 62 } 63 64 # Use GDBM if the infodb type is empty or not one of the values above 65 &close_infodb_write_handle_gdbm($infodb_handle); 68 66 } 69 67 … … 71 69 sub get_default_infodb_type 72 70 { 73 return "gdbm-txtgz"; 71 # The default is GDBM so everything works the same for existing collections 72 # To use something else, specify the "infodbtype" in the collection's collect.cfg file 73 return "gdbm"; 74 74 } 75 75 … … 85 85 return &get_infodb_file_path_sqlite($collection_name, $infodb_directory_path); 86 86 } 87 elsif ($infodb_type eq "gdbm") 88 { 89 return &get_infodb_file_path_gdbm($collection_name, $infodb_directory_path); 90 } 91 92 # Use text (gzipped) version ready for conversion to GDBM 93 # if the infodb type is empty or not one of the values above return 94 return &get_infodb_file_path_gdbm_txtgz($collection_name, $infodb_directory_path); 87 elsif ($infodb_type eq "gdbm-txtgz") 88 { 89 return &get_infodb_file_path_gdbm_txtgz($collection_name, $infodb_directory_path); 90 } 91 92 # Use GDBM if the infodb type is empty or not one of the values above 93 return &get_infodb_file_path_gdbm($collection_name, $infodb_directory_path); 95 94 } 96 95 … … 106 105 return &read_infodb_file_sqlite($infodb_file_path, $infodb_map); 107 106 } 108 elsif ($infodb_type eq "gdbm") 109 { 110 return &read_infodb_file_gdbm($infodb_file_path, $infodb_map); 111 } 112 113 # Use text (gzipped) version ready for conversion to GDBM 114 # if the infodb type is empty or not one of the values above return 115 return &read_infodb_file_gdbm_txtgz($infodb_file_path, $infodb_map); 107 elsif ($infodb_type eq "gdbm-txtgz") 108 { 109 return &read_infodb_file_gdbm_txtgz($infodb_file_path, $infodb_map); 110 } 111 112 # Use GDBM if the infodb type is empty or not one of the values above 113 return &read_infodb_file_gdbm($infodb_file_path, $infodb_map); 116 114 } 117 115 … … 128 126 return &write_infodb_entry_sqlite($infodb_handle, $infodb_key, $infodb_map); 129 127 } 130 elsif ($infodb_type eq "gdbm") 131 { 132 return &write_infodb_entry_gdbm($infodb_handle, $infodb_key, $infodb_map); 133 } 134 135 # Use text (gzipped) version ready for conversion to GDBM 136 # if the infodb type is empty or not one of the values above return 137 return &write_infodb_entry_gdbm_txtgz($infodb_handle, $infodb_key, $infodb_map); 128 elsif ($infodb_type eq "gdbm-txtgz") 129 { 130 return &write_infodb_entry_gdbm_txtgz($infodb_handle, $infodb_key, $infodb_map); 131 } 132 133 # Use GDBM if the infodb type is empty or not one of the values above 134 return &write_infodb_entry_gdbm($infodb_handle, $infodb_key, $infodb_map); 138 135 } 139 136 … … 265 262 return $infodb_file_handle; 266 263 } 264 267 265 268 266 sub close_infodb_write_handle_gdbm
Note:
See TracChangeset
for help on using the changeset viewer.