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

Method encoded

postgres/parser/json/jentry.go:86–94  ·  view source on GitHub ↗

encoded returns the encoded form of the jEntry.

(mode encodingMode)

Source from the content-addressed store, hash-verified

84
85// encoded returns the encoded form of the jEntry.
86func (e jEntry) encoded(mode encodingMode) uint32 {
87 switch mode.typ {
88 case lengthEncoding:
89 return e.typCode | e.length
90 case offsetEncoding:
91 return jEntryIsOffFlag | e.typCode | mode.offset
92 }
93 return 0
94}
95
96func getJEntryAt(b []byte, idx int, offset int) (jEntry, error) {
97 enc, err := getUint32At(b, idx)

Callers 3

encodeMethod · 0.95
encodeMethod · 0.95
EncodeJSONFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected