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

Method buffer

pkg/sql/parser/scan.go:70–74  ·  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

68// buffer returns an empty []byte buffer that can be appended to. Any unused
69// portion can be returned later using returnBuffer.
70func (s *scanner) buffer() []byte {
71 buf := s.bytesPrealloc[:0]
72 s.bytesPrealloc = nil
73 return buf
74}
75
76// returnBuffer returns the unused portion of buf to the scanner, to be used for
77// 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