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

Method test_prefix_with

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

Source from the content-addressed store, hash-verified

823 )
824
825 def test_prefix_with(self):
826 table1 = self.tables.mytable
827
828 stmt = (
829 table1.update()
830 .prefix_with("A", "B", dialect="mysql")
831 .prefix_with("C", "D")
832 )
833
834 self.assert_compile(
835 stmt,
836 "UPDATE C D mytable SET myid=:myid, name=:name, "
837 "description=:description",
838 )
839
840 self.assert_compile(
841 stmt,
842 "UPDATE A B C D mytable SET myid=%s, name=%s, description=%s",
843 dialect=mysql.dialect(),
844 )
845
846 def test_update_to_expression_one(self):
847 """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