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

Function getStringField

src/Server/WebTerminalRequestHandler.cpp:273–278  ·  view source on GitHub ↗

Read a top-level string field. Returns empty string if the key is missing. Throws on type mismatch.

Source from the content-addressed store, hash-verified

271/// Read a top-level string field. Returns empty string if the key is missing.
272/// Throws on type mismatch.
273String getStringField(const Poco::JSON::Object::Ptr & object, const char * key)
274{
275 if (!object->has(key))
276 return {};
277 return object->getValue<String>(key);
278}
279
280/// Read a top-level integer field, clamped to [0, max_value]. Returns -1 if
281/// the key is missing. Throws on type mismatch.

Callers 2

parseResizeMessageFunction · 0.85
parseAuthMessageFunction · 0.85

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected