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

Method allPaths

pkg/util/json/json.go:864–879  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

862}
863
864func (j jsonObject) allPaths() ([]JSON, error) {
865 if len(j) == 0 {
866 return []JSON{j}, nil
867 }
868 ret := make([]JSON, 0, len(j))
869 for i := range j {
870 paths, err := j[i].v.allPaths()
871 if err != nil {
872 return nil, err
873 }
874 for _, path := range paths {
875 ret = append(ret, jsonObject{jsonKeyValuePair{k: j[i].k, v: path}})
876 }
877 }
878 return ret, nil
879}
880
881// FromDecimal returns a JSON value given a apd.Decimal.
882func FromDecimal(v apd.Decimal) JSON {

Callers

nothing calls this directly

Calls 1

allPathsMethod · 0.65

Tested by

no test coverage detected