usql update

This commit is contained in:
2022-01-16 19:54:19 +01:00
parent a45423692e
commit c01571bb84
13 changed files with 347 additions and 274 deletions

View File

@@ -52,8 +52,8 @@ int ColBooleanValue::compare(ColValue &other) const {
return m_bool == other.getBoolValue() ? 0 : m_bool && !other.getBoolValue() ? -1 : 1; // true first
}
Row::Row(const Row &other) : m_columns(other.m_columns.size()), m_visible(other.m_visible) {
for (int i = 0; i < other.m_columns.size(); i++) {
Row::Row(const Row &other) : m_visible(other.m_visible), m_columns(other.m_columns.size()) {
for (size_t i = 0; i < other.m_columns.size(); i++) {
if (other[i].isNull())
continue; // for null NOP
@@ -156,7 +156,7 @@ void Row::setColumnValue(ColDefNode *col_def, ValueNode *col_value) {
}
int Row::compare(const Row &other) const {
for (int ci = 0; ci < m_columns.size(); ci++) {
for (size_t ci = 0; ci < m_columns.size(); ci++) {
int cmp = this->operator[](ci).compare(other[ci]);
if (cmp != 0) return cmp;
}
@@ -166,7 +166,7 @@ int Row::compare(const Row &other) const {
void Row::print(const std::vector<ColDefNode> &col_defs) {
std::string out{"| "};
for (int ci = 0; ci < m_columns.size(); ci++) {
for (size_t ci = 0; ci < m_columns.size(); ci++) {
auto & col_def = col_defs[ci];
int col_size = print_get_column_size(col_def);