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

Method HasContainerLeaf

postgres/parser/json/json.go:1865–1879  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1863func (j jsonNumber) doRemovePath([]string) (JSON, bool, error) { return j, false, nil }
1864
1865func (j jsonObject) HasContainerLeaf() (bool, error) {
1866 if j.Len() == 0 {
1867 return true, nil
1868 }
1869 for _, c := range j {
1870 child, err := c.v.HasContainerLeaf()
1871 if err != nil {
1872 return false, err
1873 }
1874 if child {
1875 return true, nil
1876 }
1877 }
1878 return false, nil
1879}
1880
1881func (j jsonArray) HasContainerLeaf() (bool, error) {
1882 if j.Len() == 0 {

Callers

nothing calls this directly

Calls 2

LenMethod · 0.95
HasContainerLeafMethod · 0.65

Tested by

no test coverage detected