MCPcopy
hub / github.com/dgraph-io/dgraph / Done

Method Done

codec/codec.go:130–136  ·  view source on GitHub ↗

Done returns the final output of the encoder. This UidPack MUST BE FREED via a call to FreePack.

()

Source from the content-addressed store, hash-verified

128
129// Done returns the final output of the encoder. This UidPack MUST BE FREED via a call to FreePack.
130func (e *Encoder) Done() *pb.UidPack {
131 e.packBlock()
132 if e.pack != nil && e.Alloc != nil {
133 e.pack.AllocRef = e.Alloc.Ref
134 }
135 return e.pack
136}
137
138// Decoder is used to read a pb.UidPack object back into a list of UIDs.
139type Decoder struct {

Callers 15

toListMethod · 0.95
writeIndexMethod · 0.95
EncodeFunction · 0.95
EncodeFromBufferFunction · 0.95
TestSeekFunction · 0.95
TestLinearSeekFunction · 0.95
TestDecoderFunction · 0.95
newUidPackFunction · 0.95
encodeMethod · 0.95
newUidPackFunction · 0.95
TestIndexOfPacked1Function · 0.95
TestIndexOfPacked2Function · 0.95

Calls 1

packBlockMethod · 0.95

Tested by 15

TestSeekFunction · 0.76
TestLinearSeekFunction · 0.76
TestDecoderFunction · 0.76
newUidPackFunction · 0.76
newUidPackFunction · 0.76
TestIndexOfPacked1Function · 0.76
TestIndexOfPacked2Function · 0.76
incrementFunction · 0.36
readFunction · 0.36