本文整理汇总了C++中PreparedResultSet::GetRowCount方法的典型用法代码示例。如果您正苦于以下问题:C++ PreparedResultSet::GetRowCount方法的具体用法?C++ PreparedResultSet::GetRowCount怎么用?C++ PreparedResultSet::GetRowCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PreparedResultSet
的用法示例。
在下文中一共展示了PreparedResultSet::GetRowCount方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetPreparedResult
PreparedQueryResult SQLQueryHolder::GetPreparedResult(size_t index) {
// Don't call to this function if the index is of a prepared statement
if (index < m_queries.size()) {
PreparedResultSet* result = m_queries[index].second.presult;
if (!result || !result->GetRowCount())
return PreparedQueryResult(NULL);
return PreparedQueryResult(result);
} else
return PreparedQueryResult(NULL);
}
示例2: Execute
bool PreparedStatementTask::Execute() {
if (m_has_result) {
PreparedResultSet* result = m_conn->Query(m_stmt);
if (!result || !result->GetRowCount()) {
m_result.set(PreparedQueryResult(NULL));
return false;
}
m_result.set(PreparedQueryResult(result));
return true;
}
return m_conn->Execute(m_stmt);
}
示例3: PreparedQueryResult
PreparedQueryResult DatabaseWorkerPool<T>::Query(PreparedStatement* stmt)
{
auto connection = GetFreeConnection();
PreparedResultSet* ret = connection->Query(stmt);
connection->Unlock();
//! Delete proxy-class. Not needed anymore
delete stmt;
if (!ret || !ret->GetRowCount())
{
delete ret;
return PreparedQueryResult(NULL);
}
return PreparedQueryResult(ret);
}