本文整理汇总了C++中ContentNode::md5方法的典型用法代码示例。如果您正苦于以下问题:C++ ContentNode::md5方法的具体用法?C++ ContentNode::md5怎么用?C++ ContentNode::md5使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ContentNode
的用法示例。
在下文中一共展示了ContentNode::md5方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateContentNode
bool ContentNode::updateContentNode(QSqlDatabase& database,
const ContentNode & node)
{
QSqlQuery query(database);
query.prepare ("update content set "
" name = ?, location = ?, title = ?, authors = ?, "
" description = ?, last_access = ?, publisher = ?, md5 = ?, "
" size = ?, rating = ?, read_time = ?, read_count = ?, "
" progress = ?, attributes = ? "
" where id = ?");
query.addBindValue(node.name());
query.addBindValue(node.location());
query.addBindValue(node.title());
query.addBindValue(node.authors());
query.addBindValue(node.description());
query.addBindValue(node.last_access());
query.addBindValue(node.publisher());
query.addBindValue(node.md5());
query.addBindValue(node.size());
query.addBindValue(node.rating());
query.addBindValue(node.read_time());
query.addBindValue(node.read_count());
query.addBindValue(node.progress());
query.addBindValue(node.attributes());
query.addBindValue(node.id());
return query.exec();
}
示例2: createContentNode
bool ContentNode::createContentNode(QSqlDatabase& database,
ContentNode & node)
{
QSqlQuery query(database);
query.prepare ("insert into content "
"(name, location, title, authors, description, "
"last_access, publisher, md5, "
"size, rating, read_time, read_count, progress, attributes ) "
" values "
"(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
query.addBindValue(node.name());
query.addBindValue(node.location());
query.addBindValue(node.title());
query.addBindValue(node.authors());
query.addBindValue(node.description());
query.addBindValue(node.last_access());
query.addBindValue(node.publisher());
query.addBindValue(node.md5());
query.addBindValue(node.size());
query.addBindValue(node.rating());
query.addBindValue(node.read_time());
query.addBindValue(node.read_count());
query.addBindValue(node.progress());
query.addBindValue(node.attributes());
if (query.exec())
{
node.id_ = query.lastInsertId().toInt();
return true;
}
return false;
}