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

Method buffer

postgres/parser/parser/scan.go:84–88  ·  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

82// buffer returns an empty []byte buffer that can be appended to. Any unused
83// portion can be returned later using returnBuffer.
84func (s *scanner) buffer() []byte {
85 buf := s.bytesPrealloc[:0]
86 s.bytesPrealloc = nil
87 return buf
88}
89
90// returnBuffer returns the unused portion of buf to the scanner, to be used for
91// future allocBytes() or buffer() calls. The caller must not use buf again.

Callers 4

scanHexStringMethod · 0.95
scanBitStringMethod · 0.95
scanStringMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected