pgLab/pglab/Pgsql_Row.cpp
Eelke Klein 04723a289b Switching to linux for development of pglab.
Switched from qmake to cmake. Code changes to make it compile.
2017-08-23 08:10:01 +02:00

36 lines
486 B
C++

#include "Pgsql_Row.h"
#include "Pgsql_Result.h"
using namespace Pgsql;
Row::Row(const Result &result, int row)
: m_result(result)
, m_row(row)
{}
bool Row::next()
{
if (m_row < m_result.rows()) {
++m_row;
return true;
}
return false;
}
bool Row::operator==(const Row& rhs) const
{
return &m_result == &rhs.m_result
&& m_row == rhs.m_row;
}
Value Row::get(int col) const
{
return m_result.get(col, m_row);
}
//Value Row::get(const char *colname) const
//{
//}