(
self, index: Index, include_schema: bool = False
)
| 7272 | return text + self._prepared_index_name(index, include_schema=True) |
| 7273 | |
| 7274 | def _prepared_index_name( |
| 7275 | self, index: Index, include_schema: bool = False |
| 7276 | ) -> str: |
| 7277 | if index.table is not None: |
| 7278 | effective_schema = self.preparer.schema_for_object(index.table) |
| 7279 | else: |
| 7280 | effective_schema = None |
| 7281 | if include_schema and effective_schema: |
| 7282 | schema_name = self.preparer.quote_schema(effective_schema) |
| 7283 | else: |
| 7284 | schema_name = None |
| 7285 | |
| 7286 | index_name: str = self.preparer.format_index(index) |
| 7287 | |
| 7288 | if schema_name: |
| 7289 | index_name = schema_name + "." + index_name |
| 7290 | return index_name |
| 7291 | |
| 7292 | def visit_add_constraint(self, create, **kw): |
| 7293 | return "ALTER TABLE %s ADD %s" % ( |
no test coverage detected