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

Method toInt

base/base/JSON.cpp:688–697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

686}
687
688Int64 JSON::toInt() const
689{
690 ElementType type = getType();
691
692 if (type == TYPE_NUMBER)
693 return getInt();
694 if (type == TYPE_STRING)
695 return JSON(ptr_begin + 1, ptr_end, level + 1).getInt();
696 throw JSONException("JSON: cannot convert value to signed integer.");
697}
698
699UInt64 JSON::toUInt() const
700{

Callers

nothing calls this directly

Calls 4

getTypeFunction · 0.85
JSONClass · 0.70
getIntFunction · 0.50
getIntMethod · 0.45

Tested by

no test coverage detected