r"""Create a :class:`_expression.Select` from this :class:`_expression.Join`. E.g.:: stmt = table_a.join(table_b, table_a.c.id == table_b.c.a_id) stmt = stmt.select() The above will produce a SQL string resembling: .. sourcecode:: sql
(self)
| 1591 | ) |
| 1592 | |
| 1593 | def select(self) -> Select[Any]: |
| 1594 | r"""Create a :class:`_expression.Select` from this |
| 1595 | :class:`_expression.Join`. |
| 1596 | |
| 1597 | E.g.:: |
| 1598 | |
| 1599 | stmt = table_a.join(table_b, table_a.c.id == table_b.c.a_id) |
| 1600 | |
| 1601 | stmt = stmt.select() |
| 1602 | |
| 1603 | The above will produce a SQL string resembling: |
| 1604 | |
| 1605 | .. sourcecode:: sql |
| 1606 | |
| 1607 | SELECT table_a.id, table_a.col, table_b.id, table_b.a_id |
| 1608 | FROM table_a JOIN table_b ON table_a.id = table_b.a_id |
| 1609 | |
| 1610 | """ |
| 1611 | return Select(self.left, self.right).select_from(self) |
| 1612 | |
| 1613 | @util.preload_module("sqlalchemy.sql.util") |
| 1614 | def _anonymous_fromclause( |