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

Function FromInt

pkg/util/json/json.go:944–948  ·  view source on GitHub ↗

FromInt returns a JSON value given a int.

(v int)

Source from the content-addressed store, hash-verified

942
943// FromInt returns a JSON value given a int.
944func FromInt(v int) JSON {
945 dec := apd.Decimal{}
946 dec.SetFinite(int64(v), 0)
947 return jsonNumber(dec)
948}
949
950// FromInt64 returns a JSON value given a int64.
951func 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…