MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / has_index

Method has_index

lib/sqlalchemy/engine/default.py:734–743  ·  view source on GitHub ↗
(self, connection, table_name, index_name, schema=None, **kw)

Source from the content-addressed store, hash-verified

732 return type_api.adapt_type(typeobj, self.colspecs)
733
734 def has_index(self, connection, table_name, index_name, schema=None, **kw):
735 if not self.has_table(connection, table_name, schema=schema, **kw):
736 return False
737 for idx in self.get_indexes(
738 connection, table_name, schema=schema, **kw
739 ):
740 if idx["name"] == index_name:
741 return True
742 else:
743 return False
744
745 def has_schema(
746 self, connection: Connection, schema_name: str, **kw: Any

Callers

nothing calls this directly

Calls 2

has_tableMethod · 0.45
get_indexesMethod · 0.45

Tested by

no test coverage detected