(
self, name: bytes, pgq: PostgresQuery, *, binary: bool | None = None
)
| 581 | self._pgconn.send_prepare(name, query.query, param_types=query.types) |
| 582 | |
| 583 | def _send_query_prepared( |
| 584 | self, name: bytes, pgq: PostgresQuery, *, binary: bool | None = None |
| 585 | ) -> None: |
| 586 | if binary is None: |
| 587 | fmt = self.format |
| 588 | else: |
| 589 | fmt = BINARY if binary else TEXT |
| 590 | |
| 591 | if self._conn._pipeline: |
| 592 | self._conn._pipeline.command_queue.append( |
| 593 | partial( |
| 594 | self._pgconn.send_query_prepared, |
| 595 | name, |
| 596 | pgq.params, |
| 597 | param_formats=pgq.formats, |
| 598 | result_format=fmt, |
| 599 | ) |
| 600 | ) |
| 601 | else: |
| 602 | self._pgconn.send_query_prepared( |
| 603 | name, pgq.params, param_formats=pgq.formats, result_format=fmt |
| 604 | ) |
| 605 | |
| 606 | def _check_result_for_fetch(self) -> PGresult: |
| 607 | if self.closed: |
no test coverage detected