MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_prefix_with

Method test_prefix_with

test/sql/test_update.py:827–846  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

825 )
826
827 def test_prefix_with(self):
828 table1 = self.tables.mytable
829
830 stmt = (
831 table1.update()
832 .prefix_with("A", "B", dialect="mysql")
833 .prefix_with("C", "D")
834 )
835
836 self.assert_compile(
837 stmt,
838 "UPDATE C D mytable SET myid=:myid, name=:name, "
839 "description=:description",
840 )
841
842 self.assert_compile(
843 stmt,
844 "UPDATE A B C D mytable SET myid=%s, name=%s, description=%s",
845 dialect=mysql.dialect(),
846 )
847
848 def test_update_to_expression_one(self):
849 """test update from an expression.

Callers

nothing calls this directly

Calls 4

prefix_withMethod · 0.80
assert_compileMethod · 0.80
updateMethod · 0.45
dialectMethod · 0.45

Tested by

no test coverage detected