MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_order_by_aliased

Method test_order_by_aliased

test/orm/test_composites.py:1989–2001  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1987 )
1988
1989 def test_order_by_aliased(self):
1990 self._fixture(False)
1991 Edge = self.classes.Edge
1992 s = fixture_session()
1993 ea = aliased(Edge)
1994 self.assert_compile(
1995 s.query(ea).order_by(ea.start, ea.end),
1996 "SELECT edge_1.id AS edge_1_id, edge_1.x1 AS edge_1_x1, "
1997 "edge_1.y1 AS edge_1_y1, edge_1.x2 AS edge_1_x2, "
1998 "edge_1.y2 AS edge_1_y2 "
1999 "FROM edge AS edge_1 ORDER BY edge_1.x1, edge_1.y1, "
2000 "edge_1.x2, edge_1.y2",
2001 )
2002
2003 def test_clause_expansion(self):
2004 self._fixture(False)

Callers

nothing calls this directly

Calls 6

_fixtureMethod · 0.95
fixture_sessionFunction · 0.90
aliasedFunction · 0.90
assert_compileMethod · 0.80
order_byMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected