MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / buffer

Method buffer

pkg/sql/scanner/scan.go:122–126  ·  view source on GitHub ↗

buffer returns an empty []byte buffer that can be appended to. Any unused portion can be returned later using returnBuffer.

()

Source from the content-addressed store, hash-verified

120// buffer returns an empty []byte buffer that can be appended to. Any unused
121// portion can be returned later using returnBuffer.
122func (s *Scanner) buffer() []byte {
123 buf := s.bytesPrealloc[:0]
124 s.bytesPrealloc = nil
125 return buf
126}
127
128// returnBuffer returns the unused portion of buf to the Scanner, to be used for
129// future allocBytes() or buffer() calls. The caller must not use buf again.

Callers 6

scanHexStringMethod · 0.95
scanBitStringMethod · 0.95
scanStringMethod · 0.95
scanStringMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected