⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 result_store.cc

📁 有关MYSQL的开源码
💻 CC
字号:
#include "mysqlcppapi/query_results/Result_Store.h"#include "mysqlcppapi/row/Row.h"namespace mysqlcppapi{Result_Store::Result_Store(){}Result_Store::Result_Store(MYSQL_RES *Result_Store, bool bFullFieldInfo /* = false */) : type_base(Result_Store, bFullFieldInfo){}Result_Store::Result_Store(const Result_Store& src): type_base(src), type_container(){}Result_Store::~Result_Store(){}Result_Store& Result_Store::operator=(const Result_Store& src){  type_base::operator=(src);  return *this;}    Row Result_Store::fetch_row() const{  if(!m_pMySQL_Res)    throw ex_BadQuery("Result_Stores not fetched");     MYSQL_ROW row = mysql_fetch_row(m_pMySQL_Res.obj());  Row::type_length* length =  ::mysql_fetch_lengths(m_pMySQL_Res.obj());  if(!row || !length)    throw ex_BadQuery("Bad row");     return Row(row, *this, length);}void Result_Store::data_seek(size_type offset) const {  mysql_data_seek(m_pMySQL_Res.obj(), offset);}Result_Store::size_type Result_Store::size() const{  if(!m_pMySQL_Res)    throw ex_BadQuery("Result_Stores not fetched");  return mysql_num_rows(m_pMySQL_Res.obj());}const Row Result_Store::operator[](size_type i) const{  data_seek(i);  return fetch_row();}} //namespace

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -