simple distinct added

This commit is contained in:
2021-08-01 14:31:19 +02:00
parent 4a344d0e77
commit 50a7993a2e
9 changed files with 41 additions and 12 deletions

View File

@@ -97,6 +97,14 @@ namespace usql {
}
}
int Row::compare(const Row & other) const {
for (int ci = 0; ci < m_columns.size(); ci++) {
int cmp = m_columns[ci]->compare(other.ith_column(ci));
if (cmp != 0) return cmp;
}
return 0;
}
void Row::print(const std::vector<int> & col_char_sizes) {
std::string out{"| "};