Esempio n. 1
0
int S_SQLAccessFactory::commitDirectoryToIndex2(EntryProps &prop
                           , const std::string &indexTable
                           , std::string &table
                           , Statement &statement)
{ 
  std::ostringstream query;
  
  query << "UPDATE " << indexTable 
        << " SET \"table_name\" = '" << table  << "', "
        << " \"directory\" = '" << dran << "',"
        << " \"flags\" = '" << prop.flags << "'"
        << " WHERE \"id\"=" << prop.id
        << ";";

  DMESG("SQL: >" << query.str() << "<" << std::endl);
  
  if(statement.exec(query.str())){
    DMESG("16 Directory exists\n");
    return -1;
  } 

  return prop.id;
}