MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _prepared_index_name

Method _prepared_index_name

lib/sqlalchemy/sql/compiler.py:7274–7290  ·  view source on GitHub ↗
(
        self, index: Index, include_schema: bool = False
    )

Source from the content-addressed store, hash-verified

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" % (

Callers 10

visit_create_indexMethod · 0.95
visit_drop_indexMethod · 0.95
visit_create_indexMethod · 0.80
visit_drop_indexMethod · 0.80
visit_create_indexMethod · 0.80
visit_create_indexMethod · 0.80
visit_drop_indexMethod · 0.80
visit_create_indexMethod · 0.80
visit_drop_indexMethod · 0.80
visit_create_indexMethod · 0.80

Calls 3

format_indexMethod · 0.80
schema_for_objectMethod · 0.45
quote_schemaMethod · 0.45

Tested by

no test coverage detected