mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-14 04:57:21 +01:00
49 lines
746 B
C++
49 lines
746 B
C++
#include "query_result.h"
|
|
|
|
#include <sstream>
|
|
|
|
bool QueryResult::next_row() {
|
|
return false;
|
|
}
|
|
|
|
const char *QueryResult::get_cell(const int index) {
|
|
return "";
|
|
}
|
|
|
|
const std::string QueryResult::get_cell_str(const int index) {
|
|
return std::string(get_cell(index));
|
|
}
|
|
|
|
const bool QueryResult::get_cell_bool(const int index) {
|
|
return get_cell_int(index);
|
|
}
|
|
|
|
const int QueryResult::get_cell_int(const int index) {
|
|
if (is_cell_null(index)) {
|
|
return 0;
|
|
}
|
|
|
|
//todo better way
|
|
std::stringstream ss;
|
|
ss.str(get_cell(index));
|
|
|
|
int r;
|
|
ss >> r;
|
|
|
|
return r;
|
|
}
|
|
|
|
bool QueryResult::is_cell_null(const int index) {
|
|
return true;
|
|
}
|
|
|
|
int QueryResult::get_last_insert_rowid() {
|
|
return 0;
|
|
}
|
|
|
|
QueryResult::QueryResult() {
|
|
}
|
|
|
|
QueryResult::~QueryResult() {
|
|
}
|