MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / matchTable

Method matchTable

src/jrd/replication/Manager.cpp:68–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68bool TableMatcher::matchTable(const MetaName& tableName)
69{
70 try
71 {
72 bool enabled = false;
73 if (!m_tables.get(tableName, enabled))
74 {
75 enabled = true;
76
77 if (m_includeMatcher)
78 enabled = m_includeMatcher->matches(tableName.c_str(), tableName.length());
79
80 if (enabled && m_excludeMatcher)
81 enabled = !m_excludeMatcher->matches(tableName.c_str(), tableName.length());
82
83 m_tables.put(tableName, enabled);
84 }
85
86 return enabled;
87 }
88 catch (const Exception&)
89 {
90 // If we failed matching the table name due to some internal error, then
91 // let's allow the table to be replicated. This is not a critical failure.
92 return true;
93 }
94}
95
96
97// Replication manager

Callers 1

checkTableFunction · 0.80

Calls 5

getMethod · 0.45
matchesMethod · 0.45
c_strMethod · 0.45
lengthMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected