Changeset 16176


Ignore:
Timestamp:
2008-06-25T14:13:16+12:00 (16 years ago)
Author:
mdewsnip
Message:

Added a close_infodb_write_handle() functions and initial versions for both GDBM and SQLite, in preparation for speeding up SQLite.

Location:
gsdl/trunk/perllib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/basebuilder.pm

    r15728 r16176  
    402402    &dbutil::write_infodb_entry($self->{'infodbtype'}, $infodb_handle, "browselist", $browselist_infodb);
    403403
    404     close ($infodb_handle) if !$self->{'debug'};
     404    &dbutil::close_infodb_write_handle($self->{'infodbtype'}, $infodb_handle) if !$self->{'debug'};
    405405
    406406    print STDERR "</Stage>\n" if $self->{'gli'};
  • gsdl/trunk/perllib/dbutil.pm

    r15748 r16176  
    2929
    3030
     31sub close_infodb_write_handle
     32{
     33    my $infodb_type = shift(@_);
     34    my $infodb_handle = shift(@_);
     35
     36    if ($infodb_type eq "sqlite")
     37    {
     38    return &close_infodb_write_handle_sqlite($infodb_handle);
     39    }
     40
     41    # Use GDBM if the infodb type is empty or not one of the values above
     42    return &close_infodb_write_handle_gdbm($infodb_handle);
     43}
     44
     45
    3146sub get_default_infodb_type
    3247{
     
    103118#   GDBM IMPLEMENTATION
    104119# ----------------------------------------------------------------------------------------
     120
     121sub close_infodb_write_handle_gdbm
     122{
     123    my $infodb_handle = shift(@_);
     124
     125    close($infodb_handle);
     126}
     127
    105128
    106129sub get_infodb_file_path_gdbm
     
    189212#   SQLITE IMPLEMENTATION
    190213# ----------------------------------------------------------------------------------------
     214
     215sub close_infodb_write_handle_sqlite
     216{
     217    my $infodb_handle = shift(@_);
     218
     219    close($infodb_handle);
     220}
     221
    191222
    192223sub get_infodb_file_path_sqlite
Note: See TracChangeset for help on using the changeset viewer.