1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#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}; } }