MCPcopy Create free account
hub / github.com/Restream/reindexer / JSON

Method JSON

iterator.go:744–756  ·  view source on GitHub ↗

JSON returns JSON bytes with current document

()

Source from the content-addressed store, hash-verified

742
743// JSON returns JSON bytes with current document
744func (it *JSONIterator) JSON() (json []byte) {
745 if it.ptr < 0 {
746 panic(errIteratorNotReady)
747 }
748 o := it.jsonOffsets[it.ptr]
749 l := 0
750 if it.ptr+1 < len(it.jsonOffsets) {
751 l = it.jsonOffsets[it.ptr+1] - 1
752 } else {
753 l = len(it.json) - 2
754 }
755 return it.json[o:l]
756}
757
758// GetExplainResults returns JSON bytes with explain results
759func (it *JSONIterator) GetExplainResults() (*ExplainResults, error) {

Callers 10

GetJsonCtxMethod · 0.45
mainFunction · 0.45
TestEncDecFunction · 0.45
TestSelectFilterFunction · 0.45
TestWALQueriesFunction · 0.45
TestStrictModeFunction · 0.45
CheckIfFieldInJSONFunction · 0.45
CheckAddComplexFieldFunction · 0.45
TestShardingBuiltinFunction · 0.45

Calls

no outgoing calls

Tested by 8

TestEncDecFunction · 0.36
TestSelectFilterFunction · 0.36
TestWALQueriesFunction · 0.36
TestStrictModeFunction · 0.36
CheckIfFieldInJSONFunction · 0.36
CheckAddComplexFieldFunction · 0.36
TestShardingBuiltinFunction · 0.36