3 |
# $Id$ |
# $Id$ |
4 |
# |
# |
5 |
# $Log$ |
# $Log$ |
6 |
|
# Revision 1.25 2003/01/19 02:30:05 joko |
7 |
|
# + fix: modified call to '_initSchema' |
8 |
|
# |
9 |
|
# Revision 1.24 2002/12/22 14:13:01 joko |
10 |
|
# + sub dropDb |
11 |
|
# |
12 |
|
# Revision 1.23 2002/12/19 16:31:53 joko |
13 |
|
# +- renamed sub to 'rebuildDb' |
14 |
|
# |
15 |
# Revision 1.22 2002/12/18 22:28:16 jonen |
# Revision 1.22 2002/12/18 22:28:16 jonen |
16 |
# + added extended logging at 'getObjectByGuid()' |
# + added extended logging at 'getObjectByGuid()' |
17 |
# |
# |
169 |
my $self = shift; |
my $self = shift; |
170 |
|
|
171 |
my $dsn = shift; |
my $dsn = shift; |
172 |
|
|
173 |
|
#print Dumper($self); |
174 |
|
#exit; |
175 |
|
|
176 |
|
# TODO: re-enable |
177 |
$dsn ||= $self->{locator}->{dbi}->{dsn}; |
$dsn ||= $self->{locator}->{dbi}->{dsn}; |
|
|
|
178 |
$logger->debug( __PACKAGE__ . "->connect( dsn $dsn )" ); |
$logger->debug( __PACKAGE__ . "->connect( dsn $dsn )" ); |
179 |
|
|
180 |
#my $storage = Tangram::Relational->connect( $schema, $dsn ); |
#my $storage = Tangram::Relational->connect( $schema, $dsn ); |
186 |
# return; |
# return; |
187 |
# } |
# } |
188 |
|
|
189 |
return unless $self->_initSchema(); |
#return unless $self->_initSchema(); |
190 |
|
$self->_initSchema(); |
191 |
|
|
192 |
# create the main tangram storage object |
# create the main tangram storage object |
193 |
#$self->{COREHANDLE} = Tangram::Relational->connect( $schema, $dsn ); |
#$self->{COREHANDLE} = Tangram::Relational->connect( $schema, $dsn ); |
379 |
return $ok; |
return $ok; |
380 |
} |
} |
381 |
|
|
382 |
sub rebuildDbAndSchema { |
sub rebuildDb { |
383 |
my $self = shift; |
my $self = shift; |
384 |
$logger->info( __PACKAGE__ . "->rebuildDbAndSchema()" ); |
$logger->info( __PACKAGE__ . "->rebuildDb()" ); |
385 |
my @results; |
my @results; |
386 |
|
|
387 |
# sum up results (bool (0/1)) in array |
# sum up results (bool (0/1)) in array |
656 |
return $self->{_COREHANDLE}; |
return $self->{_COREHANDLE}; |
657 |
} |
} |
658 |
|
|
659 |
|
sub dropDb { |
660 |
|
my $self = shift; |
661 |
|
my $storage = $self->_getSubLayerHandle(); |
662 |
|
return $storage->dropDb(); |
663 |
|
} |
664 |
|
|
665 |
1; |
1; |