MCPcopy
hub / github.com/jackc/pgx / SendClose

Method SendClose

pgproto3/frontend.go:184–200  ·  view source on GitHub ↗

SendClose sends a Close message to the backend (i.e. the server). The message is buffered until Flush is called. Any error encountered will be returned from Flush.

(msg *Close)

Source from the content-addressed store, hash-verified

182// SendClose sends a Close message to the backend (i.e. the server). The message is buffered until Flush is called. Any
183// error encountered will be returned from Flush.
184func (f *Frontend) SendClose(msg *Close) {
185 if f.encodeError != nil {
186 return
187 }
188
189 prevLen := len(f.wbuf)
190 newBuf, err := msg.Encode(f.wbuf)
191 if err != nil {
192 f.encodeError = err
193 return
194 }
195 f.wbuf = newBuf
196
197 if f.tracer != nil {
198 f.tracer.traceClose('F', int32(len(f.wbuf)-prevLen), msg)
199 }
200}
201
202// SendDescribe sends a Describe message to the backend (i.e. the server). The message is buffered until Flush is
203// called. Any error encountered will be returned from Flush.

Callers 2

DeallocateMethod · 0.80
SendDeallocateMethod · 0.80

Calls 2

traceCloseMethod · 0.80
EncodeMethod · 0.65

Tested by

no test coverage detected