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

Method finishString

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

84// finishString casts the given buffer to a string and returns the unused
85// portion of the buffer. The caller must not use buf again.
86func (s *scanner) finishString(buf []byte) string {
87 str := *(*string)(unsafe.Pointer(&buf))
88 s.returnBuffer(buf)
89 return str
90}
91
92func (s *scanner) scan(lval *sqlSymType) {
93 lval.id = 0

Callers 4

scanHexStringMethod · 0.95
scanBitStringMethod · 0.95
scanStringMethod · 0.95

Calls 1

returnBufferMethod · 0.95

Tested by

no test coverage detected