MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / _prepared_index_name

Method _prepared_index_name

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

Source from the content-addressed store, hash-verified

6987 return text + self._prepared_index_name(index, include_schema=True)
6988
6989 def _prepared_index_name(
6990 self, index: Index, include_schema: bool = False
6991 ) -> str:
6992 if index.table is not None:
6993 effective_schema = self.preparer.schema_for_object(index.table)
6994 else:
6995 effective_schema = None
6996 if include_schema and effective_schema:
6997 schema_name = self.preparer.quote_schema(effective_schema)
6998 else:
6999 schema_name = None
7000
7001 index_name: str = self.preparer.format_index(index)
7002
7003 if schema_name:
7004 index_name = schema_name + "." + index_name
7005 return index_name
7006
7007 def visit_add_constraint(self, create, **kw):
7008 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