writeCopyOutResponse tells client we're about to send COPY data Format: overall format (0=text, 1=binary), num columns, format per column
(w io.Writer, numColumns int16, textFormat bool)
| 330 | func WriteBindComplete(w io.Writer) error { |
| 331 | return WriteMessage(w, MsgBindComplete, nil) |
| 332 | } |
| 333 | |
| 334 | // writeCloseComplete sends close complete |
| 335 | func WriteCloseComplete(w io.Writer) error { |
| 336 | return WriteMessage(w, MsgCloseComplete, nil) |
| 337 | } |
| 338 | |
| 339 | // writeNoData sends no data response |
| 340 | func WriteNoData(w io.Writer) error { |
| 341 | return WriteMessage(w, MsgNoData, nil) |
| 342 | } |
| 343 | |
| 344 | // WritePortalSuspended signals that Execute reached its row-count limit |
| 345 | // before exhausting the portal; the client issues another Execute on the |
| 346 | // same portal to continue fetching. |
| 347 | func WritePortalSuspended(w io.Writer) error { |
| 348 | return WriteMessage(w, MsgPortalSuspended, nil) |
| 349 | } |
| 350 | |
| 351 | // writeCopyOutResponse tells client we're about to send COPY data |
| 352 | // Format: overall format (0=text, 1=binary), num columns, format per column |
| 353 | func WriteCopyOutResponse(w io.Writer, numColumns int16, textFormat bool) error { |
| 354 | var data []byte |
| 355 | |
| 356 | // Overall format (0=text) |
| 357 | if textFormat { |
| 358 | data = append(data, 0) |
| 359 | } else { |
| 360 | data = append(data, 1) |
| 361 | } |
| 362 |
no test coverage detected