MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / select

Method select

lib/sqlalchemy/sql/selectable.py:1593–1611  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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(

Callers 15

_anonymous_fromclauseMethod · 0.95
has_sequenceMethod · 0.45
get_sequence_namesMethod · 0.45
get_schema_namesMethod · 0.45
get_table_namesMethod · 0.45
get_view_namesMethod · 0.45
_internal_has_tableMethod · 0.45
get_columnsMethod · 0.45
get_pk_constraintMethod · 0.45

Calls 2

SelectClass · 0.85
select_fromMethod · 0.45