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

Method Slice

x/x.go:839–845  ·  view source on GitHub ↗

Slice returns a slice of length n to be used for writing.

(n int)

Source from the content-addressed store, hash-verified

837
838// Slice returns a slice of length n to be used for writing.
839func (b *BytesBuffer) Slice(n int) []byte {
840 b.grow(n)
841 last := len(b.data) - 1
842 b.off += n
843 b.sz += n
844 return b.data[last][b.off-n : b.off]
845}
846
847// Length returns the size of the buffer.
848func (b *BytesBuffer) Length() int {

Callers 15

SortAndValidateFunction · 0.80
tryParseFacetListFunction · 0.80
GetGQLSchemaFunction · 0.80
processQueryFunction · 0.80
chooseTabletMethod · 0.80
runMethod · 0.80
toListMethod · 0.80
writeIndexMethod · 0.80
printAlphaProposalFunction · 0.80
processLoadFileMethod · 0.80
retrieveUidsFunction · 0.80
StringMethod · 0.80

Calls 1

growMethod · 0.95

Tested by 14

retrieveUidsFunction · 0.64
TestEncodingFunction · 0.64
TestMultiPartListMarshalFunction · 0.64
addTeachersFunction · 0.64
addSchoolsFunction · 0.64
addUsersWithSchoolsFunction · 0.64
addUsersFunction · 0.64
BenchmarkMergeSortedFunction · 0.64
TestMergeSortedRandomFunction · 0.64