(self)
| 245 | ) |
| 246 | |
| 247 | def test_update_crit_sql(self): |
| 248 | Edge, Point = (self.classes.Edge, self.classes.Point) |
| 249 | |
| 250 | sess = self._fixture() |
| 251 | |
| 252 | e1 = sess.execute( |
| 253 | select(Edge).filter(Edge.start == Point(14, 5)) |
| 254 | ).scalar_one() |
| 255 | |
| 256 | eq_(e1.end, Point(2, 7)) |
| 257 | |
| 258 | stmt = ( |
| 259 | update(Edge) |
| 260 | .filter(Edge.start == Point(14, 5)) |
| 261 | .values({Edge.end: Point(16, 10)}) |
| 262 | ) |
| 263 | |
| 264 | self.assert_compile( |
| 265 | stmt, |
| 266 | "UPDATE edges SET x2=:x2, y2=:y2 WHERE edges.x1 = :x1_1 " |
| 267 | "AND edges.y1 = :y1_1", |
| 268 | params={"x2": 16, "x1_1": 14, "y2": 10, "y1_1": 5}, |
| 269 | dialect="default", |
| 270 | ) |
| 271 | |
| 272 | def test_update_crit_evaluate(self): |
| 273 | Edge, Point = (self.classes.Edge, self.classes.Point) |
nothing calls this directly
no test coverage detected