MCPcopy
hub / github.com/go-sql-driver/mysql / takeCompleteBuffer

Method takeCompleteBuffer

buffer.go:137–142  ·  view source on GitHub ↗

takeCompleteBuffer returns the complete existing buffer. This can be used if the necessary buffer size is unknown. cap and len of the returned buffer will be equal. Only one buffer (total) can be used at a time.

()

Source from the content-addressed store, hash-verified

135// cap and len of the returned buffer will be equal.
136// Only one buffer (total) can be used at a time.
137func (b *buffer) takeCompleteBuffer() ([]byte, error) {
138 if b.busy() {
139 return nil, ErrBusyBuffer
140 }
141 return b.cachedBuf, nil
142}
143
144// store stores buf, an updated buffer, if its suitable to do so.
145func (b *buffer) store(buf []byte) {

Callers 2

writeExecutePacketMethod · 0.80
interpolateParamsMethod · 0.80

Calls 1

busyMethod · 0.95

Tested by

no test coverage detected