From 1b3ff4fa433594d7621f9e9059e5afd82849b9bc Mon Sep 17 00:00:00 2001 From: Eric Masseran Date: Tue, 2 Nov 2021 14:50:52 +0100 Subject: [PATCH] Add docstring on CTE functions --- lib/sqlalchemy/sql/selectable.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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, -- 2.47.3