82 |
structures that cannot be reconstructed via the Data::Dumper dump, |
structures that cannot be reconstructed via the Data::Dumper dump, |
83 |
such as database handles or C pointers. |
such as database handles or C pointers. |
84 |
|
|
85 |
=item C<file> => I<fname> |
=item C<path> => I<dir> |
86 |
|
|
87 |
The filename of the records file. Files for indexes will have I<fname> |
The path to database. Files for indexes will have I<path> |
88 |
as prefix. I<Mandatory>, but usually taken care of by the |
as prefix. I<Mandatory>, but usually taken care of by the |
89 |
WAIT::Database handle when the constructor is called via |
WAIT::Database handle when the constructor is called via |
90 |
WAIT::Database::create_table(). |
WAIT::Database::create_table(). |
228 |
#### warn "WARNING: Suspect use of \$_ in method create_index. name[$name]_[$_]"; |
#### warn "WARNING: Suspect use of \$_ in method create_index. name[$name]_[$_]"; |
229 |
$self->{indexes}->{$name} = |
$self->{indexes}->{$name} = |
230 |
WAIT::Index->new( |
WAIT::Index->new( |
231 |
file => $self->path.'/'.$name, |
path => $self->path.'/'.$name, |
232 |
subname => $name, |
subname => $name, |
233 |
env => $self->{env}, |
env => $self->{env}, |
234 |
maindbfile => $self->maindbfile, |
maindbfile => $self->maindbfile, |
295 |
} |
} |
296 |
|
|
297 |
my $name = join '_', ($parm{attribute}, @{$parm{pipeline}}); |
my $name = join '_', ($parm{attribute}, @{$parm{pipeline}}); |
298 |
my $idx = WAIT::InvertedIndex->new(file => $self->path.'/'.$name, |
my $idx = WAIT::InvertedIndex->new(path => $self->path.'/'.$name, |
299 |
subname=> $name, |
subname=> $name, |
300 |
env => $self->{env}, |
env => $self->{env}, |
301 |
maindbfile => $self->maindbfile, |
maindbfile => $self->maindbfile, |
342 |
if ((caller)[0] eq 'WAIT::Database') { # database knows about this |
if ((caller)[0] eq 'WAIT::Database') { # database knows about this |
343 |
$self->close; # just make sure |
$self->close; # just make sure |
344 |
|
|
345 |
my $path = $self->path; |
# my $path = $self->path; |
346 |
|
|
347 |
for (values %{$self->{indexes}}) { |
for (values %{$self->{indexes}}) { |
348 |
$_->drop; |
$_->drop; |
349 |
} |
} |
350 |
unlink "$path/records"; |
# unlink "$path/records"; |
351 |
rmdir "$path/read" or warn "Could not rmdir '$path/read'"; |
# rmdir "$path/read" or warn "Could not rmdir '$path/read'"; |
352 |
|
|
353 |
} else { |
} else { |
354 |
croak ref($self)."::drop called directly"; |
croak ref($self)."::drop called directly"; |