MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_expand_plain_update_values

Method test_expand_plain_update_values

test/ext/test_hybrid.py:1772–1783  ·  view source on GitHub ↗
(self, expand_plain, keytype)

Source from the content-addressed store, hash-verified

1770
1771 @testing.variation("keytype", ["attr", "string"])
1772 def test_expand_plain_update_values(self, expand_plain, keytype):
1773 A = expand_plain
1774
1775 # SQL tuple_ update happens instead due to __clause_element__
1776 self.assert_compile(
1777 update(A)
1778 .where(A.xy == Point(10, 12))
1779 .values({"xy" if keytype.string else A.xy: Point(5, 6)}),
1780 "UPDATE a SET (x, y)=(:param_1, :param_2) "
1781 "WHERE a.x = :x_1 AND a.y = :y_1",
1782 {"param_1": 5, "param_2": 6, "x_1": 10, "y_1": 12},
1783 )
1784
1785 @testing.variation("crud", ["insert", "update"])
1786 def test_expand_update_bulk(self, crud, expand_update, decl_base):

Callers

nothing calls this directly

Calls 5

updateFunction · 0.90
assert_compileMethod · 0.80
PointClass · 0.70
valuesMethod · 0.45
whereMethod · 0.45

Tested by

no test coverage detected