MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / alias

Method alias

lib/sqlalchemy/sql/selectable.py:804–825  ·  view source on GitHub ↗

Return an alias of this :class:`_expression.FromClause`. E.g.:: a2 = some_table.alias("a2") The above code creates an :class:`_expression.Alias` object which can be used as a FROM clause in any SELECT statement. .. seealso:: :ref:`

(
        self, name: Optional[str] = None, flat: bool = False
    )

Source from the content-addressed store, hash-verified

802 return Join(self, right, onclause, True, full)
803
804 def alias(
805 self, name: Optional[str] = None, flat: bool = False
806 ) -> NamedFromClause[_KeyColCC_co]:
807 """Return an alias of this :class:`_expression.FromClause`.
808
809 E.g.::
810
811 a2 = some_table.alias("a2")
812
813 The above code creates an :class:`_expression.Alias`
814 object which can be used
815 as a FROM clause in any SELECT statement.
816
817 .. seealso::
818
819 :ref:`tutorial_using_aliases`
820
821 :func:`_expression.alias`
822
823 """
824
825 return Alias._construct(self, name=name)
826
827 def tablesample(
828 self,

Callers 1

_anonymous_fromclauseMethod · 0.95

Calls 1

_constructMethod · 0.45

Tested by

no test coverage detected