Ignore:
Timestamp:
2010-03-31T23:08:43+13:00 (14 years ago)
Author:
davidb
Message:

read_infodb_entry() implemented for sqlite. new write_infodb_rawentry() added for main dbutil.dm class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/dbutil/mssql.pm

    r21411 r21856  
    140140  my $infodb_map = shift(@_);
    141141
    142   # !! TO IMPLEMENT
     142  print STDERR "******* mssql::read_infodb_file() TO BE IMPLEMENTED!\n";
     143  print STDERR "******* See sqlite.pm for comparable implementation that has been coded up!\n";
    143144}
    144145
     
    199200}
    200201
     202
     203sub write_infodb_rawentry
     204{
     205  my $infodb_handle = shift(@_);
     206  my $infodb_key = shift(@_);
     207  my $infodb_val = shift(@_);
     208 
     209  # Prepare the query
     210  my $safe_infodb_key = &mssql_safe($infodb_key);
     211  my $query = "INSERT INTO " . $mssql_data_table_name . " (one_key, one_value) VALUES (N'" . $safe_infodb_key . "', N'" . &mssql_safe($infodb_val) . "')";
     212  dbquery($infodb_handle, $query);
     213}
     214
    201215sub delete_infodb_entry
    202216{
Note: See TracChangeset for help on using the changeset viewer.