c++/EEDB/TrackCache.cpp
//////////////////////////////////////////////////////////////////////////////////////////////////
//
// class level MQDB style fetch methods
//
//////////////////////////////////////////////////////////////////////////////////////////////////
class level MQDB style fetch methods
class level MQDB style fetch methods
void  EEDB::TrackCache::init_from_row_map(map<string, dynadata> &row_map) {
  _primary_db_id      = row_map["track_cache_id"].i_int;
  _track_hashkey      = row_map["hashkey"].i_string;
  _remote_server_url  = row_map["remote_url"].i_string;
  _hit_count          = row_map["hit_count"].i_int;
  _percent_complete   = row_map["percent_complete"].i_double;
  _cache_file         = row_map["cache_file"].i_string;
  _seg_buildtime      = row_map["seg_buildtime"].i_double;
  if(row_map["broken"].i_string == string("y"))  { _broken=true;} else { _broken=false; }
  if(row_map["last_access"].type == MQDB::STRING) {
    string date_string = row_map["last_access"].i_string;
    _last_access = MQDB::seconds_from_epoch(date_string);
  }
  if(row_map["last_access"].type == MQDB::TIMESTAMP) {
    _last_access = row_map["last_access"].i_timestamp;
  }
}
void EEDB :: TrackCache :: init_from_row_map ( map < string , dynadata > & row_map ) { _primary_db_id = row_map [ " " ] . i_int ; _track_hashkey = row_map [ " " ] . i_string ; _remote_server_url = row_map [ " " ] . i_string ; _hit_count = row_map [ " " ] . i_int ; _percent_complete = row_map [ " " ] . i_double ; _cache_file = row_map [ " " ] . i_string ; _seg_buildtime = row_map [ " " ] . i_double ; if ( row_map [ " " ] . i_string == string ( " " ) ) { _broken = true ; } else { _broken = false ; } if ( row_map [ " " ] . type == MQDB :: STRING ) { string date_string = row_map [ " " ] . i_string ; _last_access = MQDB :: seconds_from_epoch ( date_string ) ; } if ( row_map [ " " ] . type == MQDB :: TIMESTAMP ) { _last_access = row_map [ " " ] . i_timestamp ; } }
class level MQDB style fetch methods
class level MQDB style fetch methods