[30318] | 1 | ###############################################################################
|
---|
| 2 | #
|
---|
| 3 | # BaseDBDriver.pm -- base class for all the database drivers
|
---|
| 4 | # A component of the Greenstone digital library software from the New Zealand
|
---|
| 5 | # Digital Library Project at the University of Waikato, New Zealand.
|
---|
| 6 | #
|
---|
| 7 | # Copyright (C) 1999-2015 New Zealand Digital Library Project
|
---|
| 8 | #
|
---|
| 9 | # This program is free software; you can redistribute it and/or modify it under
|
---|
| 10 | # the terms of the GNU General Public License as published by the Free Software
|
---|
| 11 | # Foundation; either version 2 of the License, or (at your option) any later
|
---|
| 12 | # version.
|
---|
| 13 | #
|
---|
| 14 | # This program is distributed in the hope that it will be useful, but WITHOUT
|
---|
| 15 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
---|
| 16 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
---|
| 17 | # more details.
|
---|
| 18 | #
|
---|
| 19 | # You should have received a copy of the GNU General Public License along with
|
---|
| 20 | # this program; if not, write to the Free Software Foundation, Inc., 675 Mass
|
---|
| 21 | # Ave, Cambridge, MA 02139, USA.
|
---|
| 22 | #
|
---|
| 23 | ###############################################################################
|
---|
| 24 |
|
---|
[30336] | 25 | package DBDrivers::BaseDBDriver;
|
---|
[30318] | 26 |
|
---|
| 27 | # Pragma
|
---|
| 28 | use strict;
|
---|
[30336] | 29 | no strict 'subs';
|
---|
| 30 | no strict 'refs'; # allow filehandles to be variables and viceversa
|
---|
[30318] | 31 |
|
---|
| 32 | # Libaries
|
---|
[30336] | 33 | use Time::HiRes qw( gettimeofday );
|
---|
[30318] | 34 | use gsprintf 'gsprintf';
|
---|
| 35 |
|
---|
[30336] | 36 |
|
---|
| 37 | ## @function constructor
|
---|
| 38 | #
|
---|
| 39 | sub new
|
---|
| 40 | {
|
---|
| 41 | my $class = shift(@_);
|
---|
| 42 | my $debug = shift(@_);
|
---|
| 43 | my $self = {};
|
---|
| 44 | # Debug messages for this driver
|
---|
| 45 | $self->{'debug'} = $debug; # 1 to enable
|
---|
[30347] | 46 | # Keep track of all opened file handles, but only for drivers that support
|
---|
| 47 | # persistent connections
|
---|
| 48 | $self->{'handle_pool'} = {};
|
---|
[30336] | 49 | # Default file extension - in this case it is an error to create a DB from
|
---|
| 50 | # BaseDBDriver
|
---|
| 51 | $self->{'default_file_extension'} = 'err';
|
---|
[30343] | 52 | # Support
|
---|
[30347] | 53 | $self->{'supports_datestamp'} = 0;
|
---|
| 54 | $self->{'supports_merge'} = 0;
|
---|
| 55 | $self->{'supports_persistentconnection'} = 0;
|
---|
| 56 | $self->{'supports_rss'} = 0;
|
---|
[30343] | 57 | $self->{'supports_set'} = 0;
|
---|
[30336] | 58 | bless($self, $class);
|
---|
| 59 | return $self;
|
---|
| 60 | }
|
---|
| 61 | ## new(void) => BaseDBDriver ##
|
---|
| 62 |
|
---|
| 63 |
|
---|
[30318] | 64 | ###############################################################################
|
---|
[30336] | 65 | ## Protected Functions
|
---|
[30318] | 66 | ###############################################################################
|
---|
| 67 |
|
---|
| 68 |
|
---|
[30336] | 69 | ## @function debugPrint(string) => void
|
---|
[30318] | 70 | #
|
---|
[30336] | 71 | sub debugPrint
|
---|
[30318] | 72 | {
|
---|
[30336] | 73 | my $self = shift(@_);
|
---|
| 74 | my $message = shift(@_);
|
---|
| 75 | if ($self->{'debug'}) {
|
---|
| 76 | my ($seconds, $microseconds) = gettimeofday();
|
---|
[30347] | 77 | print STDERR '[DEBUG:' . $seconds . '.' . $microseconds . '] ' . (caller 1)[3] . '() ' . $message . "\n";
|
---|
[30318] | 78 | }
|
---|
| 79 | }
|
---|
[30336] | 80 | ## debugPrint(string) => void ##
|
---|
[30318] | 81 |
|
---|
| 82 |
|
---|
[30336] | 83 | ## @function debugPrintFunctionHeader(*) => void
|
---|
[30318] | 84 | #
|
---|
[30336] | 85 | sub debugPrintFunctionHeader
|
---|
[30318] | 86 | {
|
---|
[30336] | 87 | my $self = shift(@_);
|
---|
| 88 | if ($self->{'debug'}) {
|
---|
| 89 | my @arguments;
|
---|
| 90 | foreach my $argument (@_) {
|
---|
| 91 | if ($argument !~ /^-?\d+(\.?\d+)?$/) {
|
---|
| 92 | push(@arguments, '"' . $argument . '"');
|
---|
| 93 | }
|
---|
| 94 | else {
|
---|
| 95 | push(@arguments, $argument);
|
---|
| 96 | }
|
---|
| 97 | }
|
---|
| 98 | my $message = '(' . join(', ', @arguments) . ')';
|
---|
| 99 | # Would love to just call debugPrint() here, but then caller would be wrong
|
---|
| 100 | my ($seconds, $microseconds) = gettimeofday();
|
---|
| 101 | print STDERR '[DEBUG:' . $seconds . '.' . $microseconds . '] ' . (caller 1)[3] . $message . "\n";
|
---|
[30318] | 102 | }
|
---|
[30336] | 103 | }
|
---|
| 104 | ## debugPrintFunctionHeader(*) => void
|
---|
[30318] | 105 |
|
---|
[30336] | 106 |
|
---|
| 107 | ## @function errorPrint(string, integer) => void
|
---|
| 108 | #
|
---|
| 109 | sub errorPrint
|
---|
| 110 | {
|
---|
| 111 | my $self = shift(@_);
|
---|
| 112 | my $message = shift(@_);
|
---|
| 113 | my $is_fatal = shift(@_);
|
---|
| 114 | print STDERR 'Error in ' . (caller 1)[3] . '! ' . $message . "\n";
|
---|
| 115 | if ($is_fatal) {
|
---|
| 116 | exit();
|
---|
[30318] | 117 | }
|
---|
| 118 | }
|
---|
[30336] | 119 | ## errorPrint(string, integer) => void ##
|
---|
[30318] | 120 |
|
---|
[30347] | 121 |
|
---|
| 122 | ## @function registerConnectionIfPersistent(filehandle, string, string) => void
|
---|
| 123 | #
|
---|
| 124 | sub registerConnectionIfPersistent
|
---|
| 125 | {
|
---|
| 126 | my $self = shift(@_);
|
---|
| 127 | my $conn = shift(@_);
|
---|
| 128 | my $path = shift(@_);
|
---|
| 129 | my $append = shift(@_);
|
---|
| 130 | if ($self->{'supports_persistentconnection'}) {
|
---|
| 131 | $self->debugPrintFunctionHeader($conn, $path, $append);
|
---|
| 132 | my $fhid = $path;
|
---|
| 133 | if (defined $append && $append eq '-append') {
|
---|
| 134 | $fhid .= ' [APPEND]';
|
---|
| 135 | }
|
---|
| 136 | $self->debugPrint('Registering connection: "' . $fhid . '"');
|
---|
| 137 | $self->{'handle_pool'}->{$fhid} = $conn;
|
---|
| 138 | }
|
---|
| 139 | return;
|
---|
| 140 | }
|
---|
| 141 | ## registerConnectionIfPersistent(filehandle, string, string) => void ##
|
---|
| 142 |
|
---|
| 143 |
|
---|
| 144 | ## @function removeConnectionIfPersistent(filehandle, string) => integer
|
---|
| 145 | #
|
---|
| 146 | sub removeConnectionIfPersistent
|
---|
| 147 | {
|
---|
| 148 | my $self = shift(@_);
|
---|
| 149 | my $handle = shift(@_);
|
---|
| 150 | my $force_close = shift(@_);
|
---|
| 151 | my $continue_close = 1;
|
---|
| 152 | if ($self->{'supports_persistentconnection'}) {
|
---|
| 153 | $self->debugPrintFunctionHeader($handle, $force_close);
|
---|
| 154 | if (defined($force_close)) {
|
---|
| 155 | # We'll need the file path so we can locate and remove the entry
|
---|
| 156 | # in the handle pool (plus possibly the [APPEND] suffix for those
|
---|
| 157 | # connections in opened in append mode)
|
---|
| 158 | my $fhid = undef;
|
---|
| 159 | # Sometimes we can cheat, as the force_close variable will have the
|
---|
| 160 | # file_path in it thanks to the DESTROY block above. Doing a regex
|
---|
| 161 | # on force_close will treat it like a string no matter what it was,
|
---|
| 162 | # and we can search for the appropriate file extension that should
|
---|
| 163 | # be there for valid paths.
|
---|
| 164 | my $pattern = '\.' . $self->{'default_file_extension'} . '(\s\[APPEND\])?$';
|
---|
| 165 | if ($force_close =~ /$pattern/) {
|
---|
| 166 | $fhid = $force_close;
|
---|
| 167 | }
|
---|
| 168 | # If we can't cheat then we are stuck finding which connection in
|
---|
| 169 | # the handle_pool we are about to close. Need to compare objects
|
---|
| 170 | # using refaddr()
|
---|
| 171 | else {
|
---|
| 172 | foreach my $possible_fhid (keys %{$self->{'handle_pool'}}) {
|
---|
| 173 | my $possible_handle = $self->{'handle_pool'}->{$possible_fhid};
|
---|
| 174 | if (ref($handle) && ref($possible_handle) && refaddr($handle) == refaddr($possible_handle)) {
|
---|
| 175 | $fhid = $possible_fhid;
|
---|
| 176 | last;
|
---|
| 177 | }
|
---|
| 178 | }
|
---|
| 179 | }
|
---|
| 180 | # If we found the fhid we can proceed to close the connection
|
---|
| 181 | if (defined($fhid)) {
|
---|
| 182 | $self->debugPrint('Closing persistent connection: ' . $fhid);
|
---|
| 183 | delete($self->{'handle_pool'}->{$fhid});
|
---|
| 184 | $continue_close = 1;
|
---|
| 185 | }
|
---|
| 186 | else {
|
---|
| 187 | print STDERR "Warning! About to close persistent database handle, but couldn't locate in open handle pool.\n";
|
---|
| 188 | }
|
---|
| 189 | }
|
---|
| 190 | # Persistent connection don't close *unless* force close is set
|
---|
| 191 | else {
|
---|
| 192 | $continue_close = 0;
|
---|
| 193 | }
|
---|
| 194 | }
|
---|
| 195 | return $continue_close;
|
---|
| 196 | }
|
---|
| 197 | ## removeConnectionIfPersistent(filehandle, string) => integer ##
|
---|
| 198 |
|
---|
| 199 |
|
---|
| 200 | ##
|
---|
| 201 | #
|
---|
| 202 | sub retrieveConnectionIfPersistent
|
---|
| 203 | {
|
---|
| 204 | my $self = shift(@_);
|
---|
| 205 | my $path = shift(@_);
|
---|
| 206 | my $append = shift(@_); # -append support
|
---|
| 207 | my $conn; # This should be populated
|
---|
| 208 | if ($self->{'supports_persistentconnection'}) {
|
---|
| 209 | $self->debugPrintFunctionHeader($path, $append);
|
---|
| 210 | my $fhid = $path;
|
---|
| 211 | # special case: if the append mode has changed for a persistent
|
---|
| 212 | # connection, we need to close the old connection first or things
|
---|
| 213 | # will get wiggy.
|
---|
| 214 | if (defined $append && $append eq '-append') {
|
---|
| 215 | # see if there is a non-append mode connection already open
|
---|
| 216 | if (defined $self->{'handle_pool'}->{$path}) {
|
---|
| 217 | $self->debugPrint("Append mode added - closing existing non-append mode connection");
|
---|
| 218 | my $old_conn = $self->{'handle_pool'}->{$path};
|
---|
| 219 | $self->close_infodb_write_handle($old_conn, $path);
|
---|
| 220 | }
|
---|
| 221 | # Append -append so we know what happened.
|
---|
| 222 | $fhid .= ' [APPEND]';
|
---|
| 223 | }
|
---|
| 224 | else {
|
---|
| 225 | my $fhid_append = $path . ' [APPEND]';
|
---|
| 226 | if (defined $self->{'handle_pool'}->{$fhid_append}) {
|
---|
| 227 | $self->debugPrint("Append mode removed - closing existing append mode connection");
|
---|
| 228 | my $old_conn = $self->{'handle_pool'}->{$fhid_append};
|
---|
| 229 | $self->close_infodb_write_handle($old_conn, $fhid_append);
|
---|
| 230 | }
|
---|
| 231 | }
|
---|
| 232 | if (defined $self->{'handle_pool'}->{$fhid}) {
|
---|
| 233 | $self->debugPrint('Retrieving existing connection: ' . $fhid);
|
---|
| 234 | $conn = $self->{'handle_pool'}->{$fhid};
|
---|
| 235 | }
|
---|
| 236 | }
|
---|
| 237 | return $conn;
|
---|
| 238 | }
|
---|
| 239 | ## ##
|
---|
| 240 |
|
---|
| 241 |
|
---|
| 242 |
|
---|
| 243 |
|
---|
| 244 |
|
---|
| 245 |
|
---|
| 246 |
|
---|
[30318] | 247 | ###############################################################################
|
---|
| 248 | ## Public Functions
|
---|
| 249 | ###############################################################################
|
---|
| 250 |
|
---|
| 251 |
|
---|
[30348] | 252 | ## @function convert_infodb_hash_to_string(hashmap) => string
|
---|
| 253 | #
|
---|
| 254 | sub convert_infodb_hash_to_string
|
---|
| 255 | {
|
---|
| 256 | my $self = shift(@_);
|
---|
| 257 | my $infodb_map = shift(@_);
|
---|
| 258 | my $infodb_entry_value = "";
|
---|
| 259 | foreach my $infodb_value_key (keys(%$infodb_map)) {
|
---|
| 260 | foreach my $infodb_value (@{$infodb_map->{$infodb_value_key}}) {
|
---|
| 261 | $infodb_entry_value .= "<$infodb_value_key>" . $infodb_value . "\n";
|
---|
| 262 | }
|
---|
| 263 | }
|
---|
| 264 | return $infodb_entry_value;
|
---|
| 265 | }
|
---|
| 266 | ## convert_infodb_hash_to_string(hashmap) => string ##
|
---|
| 267 |
|
---|
| 268 |
|
---|
| 269 | ## @function convert_infodb_string_to_hash(string) => hashmap
|
---|
| 270 | #
|
---|
| 271 | sub convert_infodb_string_to_hash
|
---|
| 272 | {
|
---|
| 273 | my $self = shift(@_);
|
---|
| 274 | my $infodb_entry_value = shift(@_);
|
---|
| 275 | my $infodb_map = ();
|
---|
| 276 |
|
---|
| 277 | if (!defined $infodb_entry_value) {
|
---|
| 278 | print STDERR "Warning: No value to convert into a infodb hashtable\n";
|
---|
| 279 | }
|
---|
| 280 | else {
|
---|
| 281 | while ($infodb_entry_value =~ /^<(.*?)>(.*)$/mg) {
|
---|
| 282 | my $infodb_value_key = $1;
|
---|
| 283 | my $infodb_value = $2;
|
---|
| 284 |
|
---|
| 285 | if (!defined($infodb_map->{$infodb_value_key})) {
|
---|
| 286 | $infodb_map->{$infodb_value_key} = [ $infodb_value ];
|
---|
| 287 | }
|
---|
| 288 | else {
|
---|
| 289 | push(@{$infodb_map->{$infodb_value_key}}, $infodb_value);
|
---|
| 290 | }
|
---|
| 291 | }
|
---|
| 292 | }
|
---|
| 293 |
|
---|
| 294 | return $infodb_map;
|
---|
| 295 | }
|
---|
| 296 | ## convert_infodb_string_to_hash(string) => hashmap ##
|
---|
| 297 |
|
---|
| 298 |
|
---|
[30336] | 299 | ## @function get_infodb_file_path(string, string) => string
|
---|
[30318] | 300 | #
|
---|
[30336] | 301 | sub get_infodb_file_path
|
---|
[30318] | 302 | {
|
---|
[30336] | 303 | my $self = shift(@_);
|
---|
| 304 | my $collection_name = shift(@_);
|
---|
| 305 | my $infodb_directory_path = shift(@_);
|
---|
| 306 | my $infodb_file_name = &util::get_dirsep_tail($collection_name) . '.' . $self->{'default_file_extension'};
|
---|
| 307 | my $infodb_file_path = &FileUtils::filenameConcatenate($infodb_directory_path, $infodb_file_name);
|
---|
[30347] | 308 | # Correct the path separators to work in Cygwin
|
---|
| 309 | if ($^O eq "cygwin") {
|
---|
| 310 | $infodb_file_path = `cygpath -w "$infodb_file_path"`;
|
---|
| 311 | chomp($infodb_file_path);
|
---|
| 312 | $infodb_file_path =~ s%\\%\\\\%g;
|
---|
| 313 | }
|
---|
[30336] | 314 | return $infodb_file_path;
|
---|
| 315 | }
|
---|
| 316 | ## get_infodb_file_path(string, string) => string ##
|
---|
| 317 |
|
---|
| 318 |
|
---|
[30347] | 319 | ## @function supportsDatestamp(void) => integer
|
---|
[30336] | 320 | #
|
---|
| 321 | sub supportsDatestamp
|
---|
| 322 | {
|
---|
| 323 | my $self = shift(@_);
|
---|
[30347] | 324 | return $self->{'supports_datestamp'};
|
---|
[30318] | 325 | }
|
---|
[30347] | 326 | ## supportsDatestamp(void) => integer ##
|
---|
[30318] | 327 |
|
---|
| 328 |
|
---|
[30336] | 329 | ## @function supportsMerge(void) => boolean
|
---|
[30318] | 330 | #
|
---|
[30336] | 331 | sub supportsMerge
|
---|
[30318] | 332 | {
|
---|
[30336] | 333 | my $self = shift(@_);
|
---|
[30347] | 334 | return $self->{'supports_merge'};
|
---|
[30318] | 335 | }
|
---|
[30347] | 336 | ## supportsMerge(void) => integer ##
|
---|
[30318] | 337 |
|
---|
| 338 |
|
---|
[30347] | 339 | ## @function supportsPersistentConnection(void) => integer
|
---|
[30336] | 340 | #
|
---|
[30347] | 341 | sub supportsPersistentConnection
|
---|
| 342 | {
|
---|
| 343 | my $self = shift(@_);
|
---|
| 344 | return $self->{'supports_persistentconnection'};
|
---|
| 345 | }
|
---|
| 346 | ## supportsPersistentConnection(void) => integer ##
|
---|
| 347 |
|
---|
| 348 |
|
---|
| 349 | ## @function supportsRSS(void) => integer
|
---|
| 350 | #
|
---|
[30336] | 351 | sub supportsRSS
|
---|
| 352 | {
|
---|
| 353 | my $self = shift(@_);
|
---|
[30347] | 354 | return $self->{'supports_rss'};
|
---|
[30336] | 355 | }
|
---|
[30347] | 356 | ## supportsRSS(void) => integer ##
|
---|
[30336] | 357 |
|
---|
| 358 |
|
---|
[30343] | 359 | ## @function supportsSet(void) => integer
|
---|
| 360 | #
|
---|
| 361 | # Not all drivers support the notion of set
|
---|
| 362 | #
|
---|
| 363 | sub supportsSet
|
---|
| 364 | {
|
---|
| 365 | my $self = shift(@_);
|
---|
| 366 | return $self->{'supports_set'};
|
---|
| 367 | }
|
---|
| 368 | ## supportsSet(void) => integer ##
|
---|
| 369 |
|
---|
| 370 |
|
---|
[30318] | 371 | ###############################################################################
|
---|
| 372 | ## Virtual Functions
|
---|
| 373 | ###############################################################################
|
---|
| 374 |
|
---|
| 375 |
|
---|
[30336] | 376 | ## @function close_infodb_write_handle(*) => void
|
---|
[30318] | 377 | #
|
---|
| 378 | sub close_infodb_write_handle
|
---|
| 379 | {
|
---|
[30336] | 380 | my $self = shift(@_);
|
---|
[30318] | 381 | gsprintf(STDERR, (caller(0))[3] . " {common.must_be_implemented}\n");
|
---|
| 382 | die("\n");
|
---|
| 383 | }
|
---|
[30336] | 384 | ## close_infodb_write_handle(*) => void ##
|
---|
[30318] | 385 |
|
---|
| 386 |
|
---|
[30336] | 387 | ## @function delete_infodb_entry(*) => void
|
---|
[30318] | 388 | #
|
---|
| 389 | sub delete_infodb_entry
|
---|
| 390 | {
|
---|
[30336] | 391 | my $self = shift(@_);
|
---|
[30318] | 392 | gsprintf(STDERR, (caller(0))[3] . " {common.must_be_implemented}\n");
|
---|
| 393 | die("\n");
|
---|
| 394 | }
|
---|
[30336] | 395 | ## delete_infodb_entry(*) => void ##
|
---|
[30318] | 396 |
|
---|
| 397 |
|
---|
[30336] | 398 | ## @function mergeDatabases(*) => void
|
---|
[30318] | 399 | #
|
---|
[30336] | 400 | sub mergeDatabases
|
---|
[30318] | 401 | {
|
---|
[30336] | 402 | my $self = shift(@_);
|
---|
[30318] | 403 | gsprintf(STDERR, (caller(0))[3] . " {common.must_be_implemented}\n");
|
---|
| 404 | die("\n");
|
---|
| 405 | }
|
---|
[30336] | 406 | ## mergeDatabases(*) => void ##
|
---|
[30318] | 407 |
|
---|
| 408 |
|
---|
[30336] | 409 | ## @function open_infodb_write_handle(*) => void
|
---|
[30318] | 410 | #
|
---|
[30336] | 411 | sub open_infodb_write_handle
|
---|
[30318] | 412 | {
|
---|
[30336] | 413 | my $self = shift(@_);
|
---|
[30318] | 414 | gsprintf(STDERR, (caller(0))[3] . " {common.must_be_implemented}\n");
|
---|
| 415 | die("\n");
|
---|
| 416 | }
|
---|
[30336] | 417 | ## open_infodb_write_handle(*) => void ##
|
---|
[30318] | 418 |
|
---|
| 419 |
|
---|
[30336] | 420 | ## @function set_infodb_entry(*) => void
|
---|
[30318] | 421 | #
|
---|
[30336] | 422 | sub set_infodb_entry
|
---|
[30318] | 423 | {
|
---|
[30336] | 424 | my $self = shift(@_);
|
---|
[30318] | 425 | gsprintf(STDERR, (caller(0))[3] . " {common.must_be_implemented}\n");
|
---|
| 426 | die("\n");
|
---|
| 427 | }
|
---|
[30336] | 428 | ## set_infodb_entry(*) => void ##
|
---|
[30318] | 429 |
|
---|
| 430 |
|
---|
[30336] | 431 | ## @function read_infodb_rawentry(*) => string
|
---|
[30318] | 432 | #
|
---|
[30336] | 433 | sub read_infodb_rawentry
|
---|
[30318] | 434 | {
|
---|
[30336] | 435 | my $self = shift(@_);
|
---|
[30318] | 436 | gsprintf(STDERR, (caller(0))[3] . " {common.must_be_implemented}\n");
|
---|
| 437 | die("\n");
|
---|
| 438 | }
|
---|
[30336] | 439 | ## read_infodb_rawentry(*) => string ##
|
---|
[30318] | 440 |
|
---|
| 441 |
|
---|
[30336] | 442 | ## @function read_infodb_file(*) => void
|
---|
[30318] | 443 | #
|
---|
| 444 | sub read_infodb_file
|
---|
| 445 | {
|
---|
[30336] | 446 | my $self = shift(@_);
|
---|
[30318] | 447 | gsprintf(STDERR, (caller(0))[3] . " {common.must_be_implemented}\n");
|
---|
| 448 | die("\n");
|
---|
| 449 | }
|
---|
[30336] | 450 | ## read_infodb_file(*) => void ##
|
---|
[30318] | 451 |
|
---|
| 452 |
|
---|
[30336] | 453 | ## @function read_infodb_keys(*) => void
|
---|
[30318] | 454 | #
|
---|
| 455 | sub read_infodb_keys
|
---|
| 456 | {
|
---|
[30336] | 457 | my $self = shift(@_);
|
---|
[30318] | 458 | gsprintf(STDERR, (caller(0))[3] . " {common.must_be_implemented}\n");
|
---|
| 459 | die("\n");
|
---|
| 460 | }
|
---|
[30336] | 461 | ## read_infodb_keys(*) => void ##
|
---|
[30318] | 462 |
|
---|
| 463 |
|
---|
[30336] | 464 | ## @function write_infodb_entry(*) => void
|
---|
[30318] | 465 | #
|
---|
| 466 | sub write_infodb_entry
|
---|
| 467 | {
|
---|
[30336] | 468 | my $self = shift(@_);
|
---|
[30318] | 469 | gsprintf(STDERR, (caller(0))[3] . " {common.must_be_implemented}\n");
|
---|
| 470 | die("\n");
|
---|
| 471 | }
|
---|
[30336] | 472 | ## write_infodb_entry(*) => void ##
|
---|
[30318] | 473 |
|
---|
| 474 |
|
---|
[30336] | 475 | ## @function write_infodb_rawentry(*) => void
|
---|
[30318] | 476 | #
|
---|
| 477 | sub write_infodb_rawentry
|
---|
| 478 | {
|
---|
[30336] | 479 | my $self = shift(@_);
|
---|
[30318] | 480 | gsprintf(STDERR, (caller(0))[3] . " {common.must_be_implemented}\n");
|
---|
| 481 | die("\n");
|
---|
| 482 | }
|
---|
[30336] | 483 | ## write_infodb_rawentry(*) => void ##
|
---|
[30318] | 484 |
|
---|
[30336] | 485 |
|
---|
[30318] | 486 | 1;
|
---|