MCPcopy Create free account
hub / github.com/dolthub/doltgresql / FromInt

Function FromInt

postgres/parser/json/json.go:1029–1033  ·  view source on GitHub ↗

FromInt returns a JSON value given a int.

(v int)

Source from the content-addressed store, hash-verified

1027
1028// FromInt returns a JSON value given a int.
1029func FromInt(v int) JSON {
1030 dec := apd.Decimal{}
1031 dec.SetInt64(int64(v))
1032 return jsonNumber(dec)
1033}
1034
1035// FromInt64 returns a JSON value given a int64.
1036func FromInt64(v int64) JSON {

Callers 1

MakeJSONFunction · 0.70

Calls 1

jsonNumberTypeAlias · 0.85

Tested by

no test coverage detected