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

Function fromArray

postgres/parser/json/json.go:994–1004  ·  view source on GitHub ↗
(v []interface{})

Source from the content-addressed store, hash-verified

992}
993
994func fromArray(v []interface{}) (JSON, error) {
995 elems := make([]JSON, len(v))
996 for i := range v {
997 var err error
998 elems[i], err = MakeJSON(v[i])
999 if err != nil {
1000 return nil, err
1001 }
1002 }
1003 return jsonArray(elems), nil
1004}
1005
1006func fromMap(v map[string]interface{}) (JSON, error) {
1007 keys := make([]string, len(v))

Callers 1

MakeJSONFunction · 0.85

Calls 2

MakeJSONFunction · 0.85
jsonArrayTypeAlias · 0.85

Tested by

no test coverage detected