7 |
############################################ |
############################################ |
8 |
# |
# |
9 |
# $Log$ |
# $Log$ |
10 |
|
# Revision 1.12 2002/12/12 02:50:15 joko |
11 |
|
# + this now (unfortunately) needs DBI for some helper functions |
12 |
|
# + TODO: these have to be refactored to another scope! (soon!) |
13 |
|
# |
14 |
# Revision 1.11 2002/12/11 06:53:19 joko |
# Revision 1.11 2002/12/11 06:53:19 joko |
15 |
# + updated pod |
# + updated pod |
16 |
# |
# |
203 |
use Data::Storage::Locator; |
use Data::Storage::Locator; |
204 |
use Data::Dumper; |
use Data::Dumper; |
205 |
|
|
206 |
|
# TODO: wipe out! |
207 |
|
use DBI; |
208 |
|
|
209 |
# TODO: actually implement level (integrate with Log::Dispatch) |
# TODO: actually implement level (integrate with Log::Dispatch) |
210 |
my $TRACELEVEL = 0; |
my $TRACELEVEL = 0; |
211 |
|
|
371 |
return $database_name; |
return $database_name; |
372 |
} |
} |
373 |
|
|
374 |
|
sub testAvailability { |
375 |
|
my $self = shift; |
376 |
|
my $status = $self->testDsn(); |
377 |
|
$self->{locator}->{status}->{available} = $status; |
378 |
|
return $status; |
379 |
|
} |
380 |
|
|
381 |
|
sub isConnected { |
382 |
|
my $self = shift; |
383 |
|
# TODO: REVIEW! |
384 |
|
return 1 if $self->{STORAGEHANDLE}; |
385 |
|
} |
386 |
|
|
387 |
sub testDsn { |
sub testDsn { |
388 |
my $self = shift; |
my $self = shift; |
389 |
my $dsn = $self->{locator}->{dbi}->{dsn}; |
my $dsn = $self->{locator}->{dbi}->{dsn}; |
401 |
} |
} |
402 |
} |
} |
403 |
|
|
|
sub testAvailability { |
|
|
my $self = shift; |
|
|
my $status = $self->testDsn(); |
|
|
$self->{locator}->{status}->{available} = $status; |
|
|
return $status; |
|
|
} |
|
|
|
|
|
|
|
404 |
sub dropDb { |
sub dropDb { |
405 |
my $self = shift; |
my $self = shift; |
406 |
my $dsn = $self->{locator}->{dbi}->{dsn}; |
my $dsn = $self->{locator}->{dbi}->{dsn}; |
428 |
return $ok; |
return $ok; |
429 |
} |
} |
430 |
|
|
|
sub isConnected { |
|
|
my $self = shift; |
|
|
return 1 if $self->{STORAGEHANDLE}; |
|
|
} |
|
|
|
|
431 |
1; |
1; |
432 |
__END__ |
__END__ |
433 |
|
|