| 721 | |
| 722 | @testing.requires.tuple_in |
| 723 | def test_expanding_in_composite(self, connection): |
| 724 | users = self.tables.users |
| 725 | |
| 726 | connection.execute( |
| 727 | users.insert(), |
| 728 | [ |
| 729 | dict(user_id=7, user_name="jack"), |
| 730 | dict(user_id=8, user_name="fred"), |
| 731 | dict(user_id=9, user_name=None), |
| 732 | ], |
| 733 | ) |
| 734 | |
| 735 | stmt = ( |
| 736 | select(users) |
| 737 | .where( |
| 738 | tuple_(users.c.user_id, users.c.user_name).in_( |
| 739 | bindparam("uname", expanding=True) |
| 740 | ) |
| 741 | ) |
| 742 | .order_by(users.c.user_id) |
| 743 | ) |
| 744 | |
| 745 | eq_( |
| 746 | connection.execute(stmt, {"uname": [(7, "jack")]}).fetchall(), |
| 747 | [(7, "jack")], |
| 748 | ) |
| 749 | |
| 750 | eq_( |
| 751 | connection.execute( |
| 752 | stmt, {"uname": [(7, "jack"), (8, "fred")]} |
| 753 | ).fetchall(), |
| 754 | [(7, "jack"), (8, "fred")], |
| 755 | ) |
| 756 | |
| 757 | @testing.skip_if(["mssql"]) |
| 758 | def test_bind_in(self, connection): |