MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_create_index_exists

Method test_create_index_exists

test/sql/test_compiler.py:6647–6654  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6645 )
6646
6647 def test_create_index_exists(self):
6648 m = MetaData()
6649 t1 = Table("t1", m, Column("q", Integer))
6650 idx = Index("my_idx", t1.c.q)
6651 self.assert_compile(
6652 schema.CreateIndex(idx, if_not_exists=True),
6653 "CREATE INDEX IF NOT EXISTS my_idx ON t1 (q)",
6654 )
6655
6656 def test_drop_index_exists(self):
6657 m = MetaData()

Callers

nothing calls this directly

Calls 5

MetaDataClass · 0.90
TableClass · 0.90
ColumnClass · 0.90
IndexClass · 0.90
assert_compileMethod · 0.80

Tested by

no test coverage detected