summaryrefslogtreecommitdiff
path: root/lib/dbRecordSet.cpp
blob: 37541303482510648e401c3fd699f40b50a4a00a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "dbRecordSet.h"

namespace MyGrate {
	RowView::RowView(const RecordSet * rs, std::size_t rw) : recordSet {rs}, row {rw} { }

	DbValue
	RowView::operator[](std::size_t col) const
	{
		return recordSet->at(row, col);
	}

	RowView
	RecordSet::operator[](std::size_t row) const
	{
		return {this, row};
	}

	DbValue
	RecordSet::operator*() const
	{
		return at(0, 0);
	}
}