Add size() function to mysql::char_result_t #562

This commit is contained in:
Roland Bock
2024-03-24 09:20:54 +01:00
parent 93ab3fef86
commit fdbe08946b
2 changed files with 9 additions and 0 deletions

View File

@@ -68,6 +68,11 @@ namespace sqlpp
return _handle == rhs._handle;
}
size_t size() const
{
return _handle ? mysql_num_rows(_handle->mysql_res) : size_t{};
}
template <typename ResultRow>
void next(ResultRow& result_row)
{