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

Method finishString

pkg/sql/scanner/scan.go:138–142  ·  view source on GitHub ↗

finishString casts the given buffer to a string and returns the unused portion of the buffer. The caller must not use buf again.

(buf []byte)

Source from the content-addressed store, hash-verified

136// finishString casts the given buffer to a string and returns the unused
137// portion of the buffer. The caller must not use buf again.
138func (s *Scanner) finishString(buf []byte) string {
139 str := *(*string)(unsafe.Pointer(&buf))
140 s.returnBuffer(buf)
141 return str
142}
143
144func (s *Scanner) scanSetup(lval ScanSymType, allowComments bool) (int, bool) {
145 lval.SetID(0)

Callers 6

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

Calls 1

returnBufferMethod · 0.95

Tested by

no test coverage detected