MCPcopy Create free account
hub / github.com/ByConity/ByConity / shouldSyncTable

Method shouldSyncTable

src/Databases/MySQL/DatabaseCnchMaterializedMySQL.cpp:57–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57bool 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
83bool DatabaseCnchMaterializedMySQL::shouldSkipDDLCmd(const String & query) const
84{

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected