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

Method toDouble

base/base/JSON.cpp:677–686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

675
676
677double JSON::toDouble() const
678{
679 ElementType type = getType();
680
681 if (type == TYPE_NUMBER)
682 return getDouble();
683 if (type == TYPE_STRING)
684 return JSON(ptr_begin + 1, ptr_end, level + 1).getDouble();
685 throw JSONException("JSON: cannot convert value to double.");
686}
687
688Int64 JSON::toInt() const
689{

Callers

nothing calls this directly

Calls 3

getTypeFunction · 0.85
JSONClass · 0.70
getDoubleMethod · 0.45

Tested by

no test coverage detected