(self, ddl: str, in_pool: bool = True)
| 565 | return response |
| 566 | |
| 567 | async def run_ddl(self, ddl: str, in_pool: bool = True): |
| 568 | query_id = self.get_query_id() |
| 569 | |
| 570 | if self.log_queries: |
| 571 | self.print_query(query_id=query_id, query=ddl) |
| 572 | |
| 573 | # If running inside a transaction: |
| 574 | current_transaction = self.current_transaction.get() |
| 575 | if current_transaction: |
| 576 | response = await current_transaction.connection.fetch(ddl) |
| 577 | elif in_pool and self.pool: |
| 578 | response = await self._run_in_pool(ddl) |
| 579 | else: |
| 580 | response = await self._run_in_new_connection(ddl) |
| 581 | |
| 582 | if self.log_responses: |
| 583 | self.print_response(query_id=query_id, response=response) |
| 584 | |
| 585 | return response |
| 586 | |
| 587 | def transform_response_to_dicts(self, results) -> list[dict]: |
| 588 | """ |
nothing calls this directly
no test coverage detected