本文整理汇总了C++中Project::CreatedAt方法的典型用法代码示例。如果您正苦于以下问题:C++ Project::CreatedAt方法的具体用法?C++ Project::CreatedAt怎么用?C++ Project::CreatedAt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Project
的用法示例。
在下文中一共展示了Project::CreatedAt方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BaseRecord
Project::Project(const Project& orig): BaseRecord(orig.connector, orig.table)
{
this->Name(orig.Name());
this->Description(orig.Description());
this->SetTeam(orig.GetTeam());
this->TimmingPlan(orig.TimmingPlan());
this->SetStatus(orig.GetStatus());
this->CreatedAt(orig.CreatedAt());
this->ExpiredAt(orig.ExpiredAt());
this->Deadline(orig.Deadline());
this->Priority(orig.Priority());
}
示例2: catch
vector<BaseRecord *> Project::RetrieveTableRecords(string where, string limit) const
{
vector<BaseRecord *> projects;
BaseRecord* baseRecord;
MYSQL_RES* res;
MYSQL_ROW row;
Project* project;
string sql;
sql = "SELECT `id`, `name`, `description`, `team`, `timming_plan`, `status`, `created_at`, `expired_at`, `deadline`, `priority` FROM `"
+ this->table + "` " + where + " " + limit;
try {
res = this->connector->Query(sql, SELECT);
}
catch(MySQLRecordNotFound* rnf) {
std::cout << rnf->what() << std::endl;
exit(ERROR_MYSQL_QUERY);
}
while(row = mysql_fetch_row(res)) {
project = new Project(this->connector);
project->id = atoi(row[0]);
project->Name(row[1]);
project->Description(row[2]);
project->SetTeam(new Team(this->connector, atoi(row[3])));
project->TimmingPlan(atof(row[4]));
project->SetStatus(new Status(this->connector, atoi(row[5])));
project->CreatedAt(new DateTime(atoi(row[6])));
project->ExpiredAt(new DateTime(atoi(row[7])));
project->Deadline(new DateTime(atoi(row[8])));
project->Priority(atoi(row[9]));
baseRecord = project;
projects.push_back(baseRecord);
}
return projects;
}