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

Method processDatabase

programs/dumper/Dumper.cpp:354–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

352}
353
354void ClickHouseDumper::processDatabase(const String & database)
355{
356 String escaped_database = escapeForFileName(database);
357
358 String db_metadata_path = config().getString("path") + "/metadata/" + escaped_database + "/";
359 for (Poco::DirectoryIterator it(db_metadata_path); it != Poco::DirectoryIterator(); ++it)
360 {
361 auto & name = it.name();
362 if (!endsWith(name, ".sql"))
363 continue;
364
365 try
366 {
367 processTable(database, unescapeForFileName(name), "",std::vector<String>(),std::vector<String>());
368 }
369 catch (...)
370 {
371 tryLogCurrentException(log);
372 }
373 }
374}
375
376void ClickHouseDumper::processTable(const String & database, const String & table,
377 const String & partition,

Callers

nothing calls this directly

Calls 8

escapeForFileNameFunction · 0.85
DirectoryIteratorClass · 0.85
unescapeForFileNameFunction · 0.85
tryLogCurrentExceptionFunction · 0.85
configFunction · 0.50
endsWithFunction · 0.50
getStringMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected