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

Function stringToNumber

src/Core/SettingsFields.cpp:61–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59
60 template <typename T>
61 T stringToNumber(const String & str)
62 {
63 if constexpr (std::is_same_v<T, bool>)
64 {
65 return stringToBool(str);
66 }
67 else
68 {
69 T value = parseWithSizeSuffix<T>(str);
70 validateFloatingPointSettingValue(value);
71 return value;
72 }
73 }
74
75 template <typename T>
76 T fieldToNumber(const Field & f)

Callers

nothing calls this directly

Calls 2

stringToBoolFunction · 0.85

Tested by

no test coverage detected