| 55 | } |
| 56 | |
| 57 | bool DatabaseCnchMaterializedMySQL::shouldSyncTable(const String & table_name) const |
| 58 | { |
| 59 | if (settings->include_tables.value.empty() && settings->exclude_tables.value.empty()) |
| 60 | return true; |
| 61 | if (!settings->include_tables.value.empty()) |
| 62 | { |
| 63 | const auto & include_tables = settings->include_tables.value; |
| 64 | for (const String & s: include_tables) |
| 65 | { |
| 66 | if (std::regex_match(table_name, std::regex(s))) |
| 67 | return true; |
| 68 | } |
| 69 | return false; |
| 70 | } |
| 71 | else |
| 72 | { |
| 73 | const auto & exclude_tables = settings->exclude_tables.value; |
| 74 | for (const String & s: exclude_tables) |
| 75 | { |
| 76 | if (std::regex_match(table_name, std::regex(s))) |
| 77 | return false; |
| 78 | } |
| 79 | return true; |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | bool DatabaseCnchMaterializedMySQL::shouldSkipDDLCmd(const String & query) const |
| 84 | { |