SendSync sends a Sync 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 *Sync)
| 242 | // SendSync sends a Sync message to the backend (i.e. the server). The message is buffered until Flush is called. Any |
| 243 | // error encountered will be returned from Flush. |
| 244 | func (f *Frontend) SendSync(msg *Sync) { |
| 245 | if f.encodeError != nil { |
| 246 | return |
| 247 | } |
| 248 | |
| 249 | prevLen := len(f.wbuf) |
| 250 | newBuf, err := msg.Encode(f.wbuf) |
| 251 | if err != nil { |
| 252 | f.encodeError = err |
| 253 | return |
| 254 | } |
| 255 | f.wbuf = newBuf |
| 256 | |
| 257 | if f.tracer != nil { |
| 258 | f.tracer.traceSync('F', int32(len(f.wbuf)-prevLen), msg) |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | // SendQuery sends a Query message to the backend (i.e. the server). The message is buffered until Flush is called. Any |
| 263 | // error encountered will be returned from Flush. |
no test coverage detected