MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / getLoadingStrictnessLevel

Function getLoadingStrictnessLevel

src/Databases/LoadingStrictnessLevel.cpp:8–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6{
7
8LoadingStrictnessLevel getLoadingStrictnessLevel(bool attach, bool force_attach, bool force_restore, bool secondary)
9{
10 if (force_restore)
11 {
12 chassert(attach);
13 chassert(force_attach);
14 return LoadingStrictnessLevel::FORCE_RESTORE;
15 }
16
17 if (force_attach)
18 {
19 chassert(attach);
20 return LoadingStrictnessLevel::FORCE_ATTACH;
21 }
22
23 if (attach)
24 return LoadingStrictnessLevel::ATTACH;
25
26 if (secondary)
27 return LoadingStrictnessLevel::SECONDARY_CREATE;
28
29 return LoadingStrictnessLevel::CREATE;
30}
31
32}

Callers 3

createDatabaseMethod · 0.85
createTableMethod · 0.85
loadMetadataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected