Changeset 30349 for gs2-extensions


Ignore:
Timestamp:
12/16/15 10:41:52 (5 years ago)
Author:
jmt12
Message:

Minor fixes to get this running in new OO system, no refactoring applied

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/tdb/trunk/perllib/DBDrivers/SQLITE.pm

    r30330 r30349  
    4545{
    4646    my $class = shift(@_);
    47     my $self = DBDrivers::BaseDBDriver->new();
     47    my $self = DBDrivers::BaseDBDriver->new(@_);
    4848    $self->{'default_file_extension'} = 'db';
    4949    # Please set db_fast to 1 if you wish to enable faster I/O to the database
     
    6868    # The SQLite path we are using
    6969    $self->{'sqlite_executable'} = '';
     70
     71    # Support
     72    $self->{'supports_set'} = 1;
     73
    7074    bless($self, $class);
    7175    return $self;
     
    107111    my $sqlcmd = shift(@_);
    108112    my $result = "";
    109     $self->_debugPrint('("' . $infodb_file_path . '", "' . $sqlcmd . '")');
     113    $self->debugPrint('("' . $infodb_file_path . '", "' . $sqlcmd . '")');
    110114    my $sqlite3_exe = $self->_getExecutable();
    111115    my $infodb_handle = undef;
     
    160164    }
    161165
    162     $self->_debugPrint('("' . $infodb_file_path . '","' . $opt_append . '")');
     166    $self->debugPrint('("' . $infodb_file_path . '","' . $opt_append . '")');
    163167
    164168    my $sqlite3_exe = $self->_getExecutable();
     
    224228    my $self = shift(@_);
    225229    my $infodb_handle = shift(@_);
    226     $self->_debugPrint('(<handle>)');
     230    $self->debugPrint('(<handle>)');
    227231    # Close the transaction we began when opening the file
    228232    print $infodb_handle "END TRANSACTION;\n";
     
    239243    my $infodb_file_path = shift(@_);
    240244    my $infodb_map = shift(@_);
    241     $self->_debugPrint('("' . $infodb_file_path . '", <hashmap>)');
     245    $self->debugPrint('("' . $infodb_file_path . '", <hashmap>)');
    242246    my $keys_str = $self->_readInfoDBCmd($infodb_file_path,"SELECT key FROM data ORDER BY key;");
    243247    my @keys = split(/\n/,$keys_str);
     
    259263    my $infodb_file_path = shift(@_);
    260264    my $infodb_map = shift(@_);
    261     $self->_debugPrint('("' . $infodb_file_path . '", <hashmap>)');
     265    $self->debugPrint('("' . $infodb_file_path . '", <hashmap>)');
    262266    my $keys_str = $self->_readInfoDBCmd($infodb_file_path,"SELECT key FROM data;");
    263267    my @keys = split(/\n/,$keys_str);
     
    277281    my $infodb_file_path = shift(@_);
    278282    my $infodb_key = shift(@_);
    279     $self->_debugPrint('("' . $infodb_file_path . '", "' . $infodb_key . '")');
     283    $self->debugPrint('("' . $infodb_file_path . '", "' . $infodb_key . '")');
    280284    my $key_safe = $self->_sqliteSafe($infodb_key);
    281285    my $select_val_cmd = "SELECT value FROM data WHERE key='$key_safe';";
     
    293297    my $infodb_file_path = shift(@_);
    294298    my $infodb_key = shift(@_);
    295     $self->_debugPrint('("' . $infodb_file_path . '", "' . $infodb_key . '")');
     299    $self->debugPrint('("' . $infodb_file_path . '", "' . $infodb_key . '")');
    296300    my $val_str = $self->read_infodb_rawentry($infodb_file_path,$infodb_key);
    297     my $rec_hash = &dbutil::convert_infodb_string_to_hash($val_str);
     301    my $rec_hash = $self->convert_infodb_string_to_hash($val_str);
    298302    return $rec_hash;
    299303}
     
    309313    my $infodb_key = shift(@_);
    310314    my $infodb_map = shift(@_);
    311     $self->_debugPrint('(<handle>, "' . $infodb_key . '", <hashmap>)');
     315    $self->debugPrint('(<handle>, "' . $infodb_key . '", <hashmap>)');
    312316    # Add the key -> value mapping into the "data" table
    313317    my $infodb_entry_value = "";
     
    368372    my $infodb_key = shift(@_);
    369373    my $infodb_val = shift(@_);
    370     $self->_debugPrint('(<handle>, "' . $infodb_key . '", "' . $infodb_val . '")');
     374    $self->debugPrint('(<handle>, "' . $infodb_key . '", "' . $infodb_val . '")');
    371375    my $safe_infodb_key = $self->_sqliteSafe($infodb_key);
    372376    print $infodb_handle "INSERT OR REPLACE INTO data (key, value) VALUES ('" . $safe_infodb_key . "', '" . $self->_sqliteSafe($infodb_val) . "');\n";
     
    383387    my $infodb_key = shift(@_);
    384388    my $infodb_map = shift(@_);
    385     $self->_debugPrint('("' . $infodb_file_path . '", "' . $infodb_key . '", <hashmap>)');
     389    $self->debugPrint('("' . $infodb_file_path . '", "' . $infodb_key . '", <hashmap>)');
    386390    my $infodb_handle = $self->open_infodb_write_handle($infodb_file_path, "append");
    387391    if (!defined $infodb_handle) {
     
    406410    my $infodb_handle = shift(@_);
    407411    my $infodb_key = shift(@_);
    408     $self->_debugPrint('(<handle>, "' . $infodb_key . '")');
     412    $self->debugPrint('(<handle>, "' . $infodb_key . '")');
    409413    # Delete the key from the "data" table
    410414    my $safe_infodb_key = $self->_sqliteSafe($infodb_key);
Note: See TracChangeset for help on using the changeset viewer.