MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _can_create_index

Method _can_create_index

lib/sqlalchemy/sql/ddl.py:1379–1391  ·  view source on GitHub ↗
(self, index)

Source from the content-addressed store, hash-verified

1377 )
1378
1379 def _can_create_index(self, index):
1380 effective_schema = self.connection.schema_for_object(index.table)
1381 if effective_schema:
1382 self.dialect.validate_identifier(effective_schema)
1383 return (
1384 not self.checkfirst & CheckFirst.INDEXES
1385 or not self.dialect.has_index(
1386 self.connection,
1387 index.table.name,
1388 index.name,
1389 schema=effective_schema,
1390 )
1391 )
1392
1393 def _can_create_sequence(self, sequence):
1394 effective_schema = self.connection.schema_for_object(sequence)

Callers 1

visit_indexMethod · 0.95

Calls 3

schema_for_objectMethod · 0.45
validate_identifierMethod · 0.45
has_indexMethod · 0.45

Tested by

no test coverage detected