MCPcopy Create free account
hub / github.com/zzzeek/sqlalchemy / test_dialect_specific_ddl

Method test_dialect_specific_ddl

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

Source from the content-addressed store, hash-verified

6442 )
6443
6444 def test_dialect_specific_ddl(self):
6445 from sqlalchemy.dialects.postgresql import ExcludeConstraint
6446
6447 m = MetaData()
6448 tbl = Table("testtbl", m, Column("room", Integer, primary_key=True))
6449 cons = ExcludeConstraint(("room", "="))
6450 tbl.append_constraint(cons)
6451
6452 eq_ignore_whitespace(
6453 str(schema.AddConstraint(cons)),
6454 "ALTER TABLE testtbl ADD EXCLUDE USING gist (room WITH =)",
6455 )
6456
6457 def test_try_cast(self):
6458 t1 = Table("t1", MetaData(), Column("id", Integer, primary_key=True))

Callers

nothing calls this directly

Calls 6

append_constraintMethod · 0.95
MetaDataClass · 0.90
TableClass · 0.90
ColumnClass · 0.90
ExcludeConstraintClass · 0.90
eq_ignore_whitespaceFunction · 0.90

Tested by

no test coverage detected