| 113 | |
| 114 | @testing.requires.order_by_label_with_expression |
| 115 | def test_order_by_label_compound(self, connection): |
| 116 | users = self.tables.users |
| 117 | connection.execute( |
| 118 | users.insert(), |
| 119 | [ |
| 120 | {"user_id": 7, "user_name": "jack"}, |
| 121 | {"user_id": 8, "user_name": "ed"}, |
| 122 | {"user_id": 9, "user_name": "fred"}, |
| 123 | ], |
| 124 | ) |
| 125 | |
| 126 | concat = ("test: " + users.c.user_name).label("thedata") |
| 127 | eq_( |
| 128 | connection.execute( |
| 129 | select(concat).order_by(literal_column("thedata") + "x") |
| 130 | ).fetchall(), |
| 131 | [("test: ed",), ("test: fred",), ("test: jack",)], |
| 132 | ) |
| 133 | |
| 134 | @testing.requires.boolean_col_expressions |
| 135 | def test_or_and_as_columns(self, connection): |