if (regex_search(line, m, delete_command)) {
string table_name = m[1].str();
string condition_column = m[2].str();
string condition_value = m[3].str();
auto table_it = find_if(tables.begin(), tables.end(), [&](const auto& t){
return t.first == table_name;
});
if (table_it != tables.end()) {
auto& table = table_it->second;
auto& headers = table[0];
int cond_col_index = -1;
// Find the column index for the condition column
for (int i = 0; i < headers.size(); ++i) {
if (get(headers) == condition_column) {
cond_col_index = i;
break;
}
}
if (cond_col_index != -1) {
cout " will not be added
processed_command_line_outputs.push_back(line);
cout SELECT COUNT(*) FROM customer;
4
Подробнее здесь: https://stackoverflow.com/questions/793 ... -in-the-fi
Почему моя команда DELETE не работает и не меняет базу данных mdb в конечном выводе в терминале? ⇐ C++
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение