| 615 | |
| 616 | @testing.requires.no_quoting_special_bind_names |
| 617 | def test_expanding_in_special_chars(self, connection): |
| 618 | users = self.tables.users |
| 619 | connection.execute( |
| 620 | users.insert(), |
| 621 | [ |
| 622 | dict(user_id=7, user_name="jack"), |
| 623 | dict(user_id=8, user_name="fred"), |
| 624 | ], |
| 625 | ) |
| 626 | |
| 627 | stmt = ( |
| 628 | select(users) |
| 629 | .where(users.c.user_name.in_(bindparam("u35", expanding=True))) |
| 630 | .where(users.c.user_id == bindparam("u46")) |
| 631 | .order_by(users.c.user_id) |
| 632 | ) |
| 633 | |
| 634 | eq_( |
| 635 | connection.execute( |
| 636 | stmt, {"u35": ["jack", "fred"], "u46": 7} |
| 637 | ).fetchall(), |
| 638 | [(7, "jack")], |
| 639 | ) |
| 640 | |
| 641 | stmt = ( |
| 642 | select(users) |
| 643 | .where(users.c.user_name.in_(bindparam("u.35", expanding=True))) |
| 644 | .where(users.c.user_id == bindparam("u.46")) |
| 645 | .order_by(users.c.user_id) |
| 646 | ) |
| 647 | |
| 648 | eq_( |
| 649 | connection.execute( |
| 650 | stmt, {"u.35": ["jack", "fred"], "u.46": 7} |
| 651 | ).fetchall(), |
| 652 | [(7, "jack")], |
| 653 | ) |
| 654 | |
| 655 | def test_expanding_in_multiple(self, connection): |
| 656 | users = self.tables.users |