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

Method HasContainerLeaf

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

Source from the content-addressed store, hash-verified

1790func (j jsonNumber) doRemovePath([]string) (JSON, bool, error) { return j, false, nil }
1791
1792func (j jsonObject) HasContainerLeaf() (bool, error) {
1793 if j.Len() == 0 {
1794 return true, nil
1795 }
1796 for _, c := range j {
1797 child, err := c.v.HasContainerLeaf()
1798 if err != nil {
1799 return false, err
1800 }
1801 if child {
1802 return true, nil
1803 }
1804 }
1805 return false, nil
1806}
1807
1808func (j jsonArray) HasContainerLeaf() (bool, error) {
1809 if j.Len() == 0 {

Callers

nothing calls this directly

Calls 2

LenMethod · 0.95
HasContainerLeafMethod · 0.65

Tested by

no test coverage detected