MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / FromInt

Function FromInt

pkg/util/json/json.go:1939–1943  ·  view source on GitHub ↗

FromInt returns a JSON value given a int.

(v int)

Source from the content-addressed store, hash-verified

1937
1938// FromInt returns a JSON value given a int.
1939func FromInt(v int) JSON {
1940 dec := apd.Decimal{}
1941 dec.SetInt64(int64(v))
1942 return jsonNumber(dec)
1943}
1944
1945// FromInt64 returns a JSON value given a int64.
1946func FromInt64(v int64) JSON {

Callers 2

AsJSONFunction · 0.92
MakeJSONFunction · 0.70

Calls 1

jsonNumberTypeAlias · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…