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

Function FromInt64

postgres/parser/json/json.go:1036–1040  ·  view source on GitHub ↗

FromInt64 returns a JSON value given a int64.

(v int64)

Source from the content-addressed store, hash-verified

1034
1035// FromInt64 returns a JSON value given a int64.
1036func FromInt64(v int64) JSON {
1037 dec := apd.Decimal{}
1038 dec.SetInt64(v)
1039 return jsonNumber(dec)
1040}
1041
1042// FromFloat64 returns a JSON value given a float64.
1043func FromFloat64(v float64) (JSON, error) {

Callers 1

MakeJSONFunction · 0.70

Calls 1

jsonNumberTypeAlias · 0.85

Tested by

no test coverage detected