void
MySqlRun::connect(const string &host, const string &user, const string &passwd,
- const string &db, const string &name, const string &project)
+ const string &db, const string &name, const string &sample,
+ const string &project)
{
if (connected())
panic("can only get one database connection at this time!");
remove(name);
cleanup();
- setup(name, user, project);
+ setup(name, sample, user, project);
}
void
-MySqlRun::setup(const string &name, const string &user, const string &project)
+MySqlRun::setup(const string &name, const string &sample, const string &user,
+ const string &project)
{
assert(mysql.connected());
stringstream insert;
ccprintf(insert,
"INSERT INTO "
- "runs(rn_name, rn_user, rn_project, rn_date, rn_expire)"
- "values(\"%s\", \"%s\", \"%s\", NOW(),"
+ "runs(rn_name,rn_sample,rn_user,rn_project,rn_date,rn_expire)"
+ "values(\"%s\", \"%s\", \"%s\", \"%s\", NOW(),"
"DATE_ADD(CURDATE(), INTERVAL 31 DAY))",
- name, user, project);
+ name, sample, user, project);
mysql.query(insert);
if (mysql.error)
bool connected() const { return mysql.connected(); }
void connect(const std::string &host, const std::string &user,
const std::string &passwd, const std::string &db,
- const std::string &name, const std::string &project);
+ const std::string &name, const std::string &sample,
+ const std::string &project);
- void setup(const std::string &name, const std::string &user,
- const std::string &project);
+ void setup(const std::string &name, const std::string &sample,
+ const std::string &user, const std::string &project);
void remove(const std::string &name);
void cleanup();