MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_compound_populates

Method test_compound_populates

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

Source from the content-addressed store, hash-verified

7894 """
7895
7896 def test_compound_populates(self):
7897 t = Table("t", MetaData(), Column("a", Integer), Column("b", Integer))
7898 stmt = select(t).union(select(t))
7899 comp = stmt.compile()
7900 eq_(
7901 comp._create_result_map(),
7902 {
7903 "a": ("a", (t.c.a, "a", "a", "t_a"), t.c.a.type, 0),
7904 "b": ("b", (t.c.b, "b", "b", "t_b"), t.c.b.type, 1),
7905 },
7906 )
7907
7908 def test_compound_not_toplevel_doesnt_populate(self):
7909 t = Table("t", MetaData(), Column("a", Integer), Column("b", Integer))

Callers

nothing calls this directly

Calls 8

TableClass · 0.90
MetaDataClass · 0.90
ColumnClass · 0.90
selectFunction · 0.90
eq_Function · 0.90
_create_result_mapMethod · 0.80
unionMethod · 0.45
compileMethod · 0.45

Tested by

no test coverage detected