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

Method toUInt

base/base/JSON.cpp:699–708  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

697}
698
699UInt64 JSON::toUInt() const
700{
701 ElementType type = getType();
702
703 if (type == TYPE_NUMBER)
704 return getUInt();
705 if (type == TYPE_STRING)
706 return JSON(ptr_begin + 1, ptr_end, level + 1).getUInt();
707 throw JSONException("JSON: cannot convert value to unsigned integer.");
708}
709
710std::string JSON::toString() const
711{

Callers 1

loadMethod · 0.80

Calls 4

getTypeFunction · 0.85
JSONClass · 0.70
getUIntFunction · 0.50
getUIntMethod · 0.45

Tested by

no test coverage detected