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

Method alreadyDecoded

pkg/util/json/encoded.go:47–54  ·  view source on GitHub ↗

alreadyDecoded returns a decoded JSON value if this jsonEncoded has already been decoded, otherwise it returns nil. This allows us to fast-path certain operations if we've already done the work of decoding an object.

()

Source from the content-addressed store, hash-verified

45// been decoded, otherwise it returns nil. This allows us to fast-path certain
46// operations if we've already done the work of decoding an object.
47func (j *jsonEncoded) alreadyDecoded() JSON {
48 j.mu.RLock()
49 defer j.mu.RUnlock()
50 if j.mu.cachedDecoded != nil {
51 return j.mu.cachedDecoded
52 }
53 return nil
54}
55
56func (j *jsonEncoded) Type() Type {
57 return j.typ

Callers 6

FetchValIdxMethod · 0.95
FetchValKeyMethod · 0.95
shallowDecodeMethod · 0.95
AsTextMethod · 0.95
ExistsMethod · 0.95
preprocessForContainsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected