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

Method alreadyDecoded

postgres/parser/json/encoded.go:61–68  ·  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

59// been decoded, otherwise it returns nil. This allows us to fast-path certain
60// operations if we've already done the work of decoding an object.
61func (j *jsonEncoded) alreadyDecoded() JSON {
62 j.mu.RLock()
63 defer j.mu.RUnlock()
64 if j.mu.cachedDecoded != nil {
65 return j.mu.cachedDecoded
66 }
67 return nil
68}
69
70func (j *jsonEncoded) Type() Type {
71 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