(self)
| 2471 | ) |
| 2472 | |
| 2473 | def test_in_27(self): |
| 2474 | # test that putting a select in an IN clause does not |
| 2475 | # blow away its ORDER BY clause |
| 2476 | self.assert_compile( |
| 2477 | select(self.table1, self.table2) |
| 2478 | .where( |
| 2479 | self.table2.c.otherid.in_( |
| 2480 | select(self.table2.c.otherid) |
| 2481 | .order_by(self.table2.c.othername) |
| 2482 | .limit(10) |
| 2483 | .correlate(False), |
| 2484 | ) |
| 2485 | ) |
| 2486 | .select_from( |
| 2487 | self.table1.join( |
| 2488 | self.table2, |
| 2489 | self.table1.c.myid == self.table2.c.otherid, |
| 2490 | ) |
| 2491 | ) |
| 2492 | .order_by(self.table1.c.myid), |
| 2493 | "SELECT mytable.myid, " |
| 2494 | "myothertable.otherid, myothertable.othername FROM mytable " |
| 2495 | "JOIN myothertable ON mytable.myid = myothertable.otherid " |
| 2496 | "WHERE myothertable.otherid IN (SELECT myothertable.otherid " |
| 2497 | "FROM myothertable ORDER BY myothertable.othername " |
| 2498 | "LIMIT :param_1) ORDER BY mytable.myid", |
| 2499 | {"param_1": 10}, |
| 2500 | ) |
| 2501 | |
| 2502 | def test_in_28(self): |
| 2503 | """revised to test #12314""" |
nothing calls this directly
no test coverage detected