MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_with_expr_one

Method test_with_expr_one

test/orm/test_core_compilation.py:1520–1532  ·  view source on GitHub ↗
(self, query_expression_fixture)

Source from the content-addressed store, hash-verified

1518 )
1519
1520 def test_with_expr_one(self, query_expression_fixture):
1521 User = query_expression_fixture
1522
1523 stmt = select(User).options(
1524 with_expression(User.value, User.name + "foo")
1525 )
1526
1527 self.assert_compile(
1528 stmt,
1529 "SELECT users.name || :name_1 AS anon_1, :param_1 AS anon_2, "
1530 "users.id, "
1531 "users.name FROM users",
1532 )
1533
1534 def test_exported_columns_query_expression(self, query_expression_fixture):
1535 """test behaviors related to #8881"""

Callers

nothing calls this directly

Calls 4

selectFunction · 0.90
with_expressionFunction · 0.90
assert_compileMethod · 0.80
optionsMethod · 0.45

Tested by

no test coverage detected