r"""Return a new :class:`_expression.CTE` with a SQL ``UNION`` of the original CTE against the given selectables provided as positional arguments. :param \*other: one or more elements with which to create a UNION. .. versionchanged:: 1.4.28 multiple elemen
(self, *other: _SelectStatementForCompoundArgument[Any])
| 2243 | ) |
| 2244 | |
| 2245 | def union(self, *other: _SelectStatementForCompoundArgument[Any]) -> CTE: |
| 2246 | r"""Return a new :class:`_expression.CTE` with a SQL ``UNION`` |
| 2247 | of the original CTE against the given selectables provided |
| 2248 | as positional arguments. |
| 2249 | |
| 2250 | :param \*other: one or more elements with which to create a |
| 2251 | UNION. |
| 2252 | |
| 2253 | .. versionchanged:: 1.4.28 multiple elements are now accepted. |
| 2254 | |
| 2255 | .. seealso:: |
| 2256 | |
| 2257 | :meth:`_sql.HasCTE.cte` - examples of calling styles |
| 2258 | |
| 2259 | """ |
| 2260 | assert is_select_statement( |
| 2261 | self.element |
| 2262 | ), f"CTE element f{self.element} does not support union()" |
| 2263 | |
| 2264 | return CTE._construct( |
| 2265 | self.element.union(*other), |
| 2266 | name=self.name, |
| 2267 | recursive=self.recursive, |
| 2268 | nesting=self.nesting, |
| 2269 | _restates=self, |
| 2270 | _prefixes=self._prefixes, |
| 2271 | _suffixes=self._suffixes, |
| 2272 | ) |
| 2273 | |
| 2274 | def union_all( |
| 2275 | self, *other: _SelectStatementForCompoundArgument[Any] |
no test coverage detected