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

Method has_index

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

Source from the content-addressed store, hash-verified

603 return type_api.adapt_type(typeobj, self.colspecs)
604
605 def has_index(self, connection, table_name, index_name, schema=None, **kw):
606 if not self.has_table(connection, table_name, schema=schema, **kw):
607 return False
608 for idx in self.get_indexes(
609 connection, table_name, schema=schema, **kw
610 ):
611 if idx["name"] == index_name:
612 return True
613 else:
614 return False
615
616 def has_schema(
617 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