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

Method SendParse

pgproto3/frontend.go:164–180  ·  view source on GitHub ↗

SendParse sends a Parse 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 *Parse)

Source from the content-addressed store, hash-verified

162// SendParse sends a Parse message to the backend (i.e. the server). The message is buffered until Flush is called. Any
163// error encountered will be returned from Flush.
164func (f *Frontend) SendParse(msg *Parse) {
165 if f.encodeError != nil {
166 return
167 }
168
169 prevLen := len(f.wbuf)
170 newBuf, err := msg.Encode(f.wbuf)
171 if err != nil {
172 f.encodeError = err
173 return
174 }
175 f.wbuf = newBuf
176
177 if f.tracer != nil {
178 f.tracer.traceParse('F', int32(len(f.wbuf)-prevLen), msg)
179 }
180}
181
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.

Callers 4

PrepareMethod · 0.80
ExecParamsMethod · 0.80
SendPrepareMethod · 0.80
SendQueryParamsMethod · 0.80

Calls 2

traceParseMethod · 0.80
EncodeMethod · 0.65

Tested by

no test coverage detected