1#if __has_include(<mysql.h>)
2#include <mysql.h>
3#else
4#include <mysql/mysql.h>
5#endif
6
7#include <mysqlxx/Connection.h>
8#include <mysqlxx/ResultBase.h>
9
10
11namespace mysqlxx
12{
13
14ResultBase::ResultBase(MYSQL_RES * res_, Connection * conn_, const Query * query_) : res(res_), conn(conn_), query(query_)
15{
16 fields = mysql_fetch_fields(res);
17 num_fields = mysql_num_fields(res);
18}
19
20ResultBase::~ResultBase()
21{
22 mysql_free_result(res);
23}
24
25}
26