]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Add docstring on CTE functions
authorEric Masseran <eric.masseran@gmail.com>
Tue, 2 Nov 2021 13:50:52 +0000 (14:50 +0100)
committerEric Masseran <eric.masseran@gmail.com>
Tue, 2 Nov 2021 13:50:52 +0000 (14:50 +0100)
lib/sqlalchemy/sql/selectable.py

index 8d77523facf0230de6d9d61645551521c4d1fa22..ce4cc08e633306ea8ae8d67ae4495eb0c56ce848 100644 (file)
@@ -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,