/[wait]/trunk/lib/WAIT/Table.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/WAIT/Table.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 113 by dpavlin, Tue Jul 13 20:28:45 2004 UTC revision 114 by dpavlin, Tue Jul 13 21:27:27 2004 UTC
# Line 82  In that moment the access-defining class Line 82  In that moment the access-defining class
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().
# Line 228  sub create_index { Line 228  sub create_index {
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,
# Line 295  sub create_inverted_index { Line 295  sub create_inverted_index {
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,
# Line 342  sub drop { Line 342  sub drop {
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";

Legend:
Removed from v.113  
changed lines
  Added in v.114

  ViewVC Help
Powered by ViewVC 1.1.26