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

Method SendBind

pgproto3/frontend.go:144–160  ·  view source on GitHub ↗

SendBind sends a Bind 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 *Bind)

Source from the content-addressed store, hash-verified

142// SendBind sends a Bind message to the backend (i.e. the server). The message is buffered until Flush is called. Any
143// error encountered will be returned from Flush.
144func (f *Frontend) SendBind(msg *Bind) {
145 if f.encodeError != nil {
146 return
147 }
148
149 prevLen := len(f.wbuf)
150 newBuf, err := msg.Encode(f.wbuf)
151 if err != nil {
152 f.encodeError = err
153 return
154 }
155 f.wbuf = newBuf
156
157 if f.tracer != nil {
158 f.tracer.traceBind('F', int32(len(f.wbuf)-prevLen), msg)
159 }
160}
161
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.

Callers 6

ExecParamsMethod · 0.80
ExecPreparedMethod · 0.80
ExecStatementMethod · 0.80
SendQueryParamsMethod · 0.80
SendQueryPreparedMethod · 0.80
SendQueryStatementMethod · 0.80

Calls 2

traceBindMethod · 0.80
EncodeMethod · 0.65

Tested by

no test coverage detected