From: Eric Masseran Date: Tue, 2 Nov 2021 13:50:52 +0000 (+0100) Subject: Add docstring on CTE functions X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1b3ff4fa433594d7621f9e9059e5afd82849b9bc;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Add docstring on CTE functions --- diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py index 8d77523fac..ce4cc08e63 100644 --- a/lib/sqlalchemy/sql/selectable.py +++ b/lib/sqlalchemy/sql/selectable.py @@ -2120,6 +2120,15 @@ class CTE( ) def union(self, *other): + """Return a new :class:`_expression.CTE` with a SQL ``UNION`` + of the original CTE against the given selectables provided + as positional arguments. + + .. seealso:: + + :meth:`_sql.HasCTE.cte` - examples of calling styles + + """ return CTE._construct( self.element.union(*other), name=self.name, @@ -2131,6 +2140,15 @@ class CTE( ) def union_all(self, *other): + """Return a new :class:`_expression.CTE` with a SQL ``UNION ALL`` + of the original CTE against the given selectables provided + as positional arguments. + + .. seealso:: + + :meth:`_sql.HasCTE.cte` - examples of calling styles + + """ return CTE._construct( self.element.union_all(*other), name=self.name,