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

Method test_intersect_unions_3

test/sql/test_query.py:1426–1442  ·  view source on GitHub ↗
(self, connection)

Source from the content-addressed store, hash-verified

1424
1425 @testing.requires.intersect
1426 def test_intersect_unions_3(self, connection):
1427 t1, t2, t3 = self.tables("t1", "t2", "t3")
1428
1429 u = intersect(
1430 select(t2.c.col3, t2.c.col4),
1431 union(
1432 select(t1.c.col3, t1.c.col4),
1433 select(t2.c.col3, t2.c.col4),
1434 select(t3.c.col3, t3.c.col4),
1435 )
1436 .alias()
1437 .select(),
1438 )
1439 wanted = [("aaa", "bbb"), ("bbb", "ccc"), ("ccc", "aaa")]
1440 found = self._fetchall_sorted(connection.execute(u))
1441
1442 eq_(found, wanted)
1443
1444 @testing.requires.intersect
1445 def test_composite_alias(self, connection):

Callers

nothing calls this directly

Calls 8

_fetchall_sortedMethod · 0.95
intersectFunction · 0.90
selectFunction · 0.90
unionFunction · 0.90
eq_Function · 0.90
selectMethod · 0.45
aliasMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected