(
self,
__argument: Optional[
Union[_ColumnsClauseArgument[Any], SelectBase, ScalarSelect[Any]]
] = None,
)
| 6904 | inherit_cache = True |
| 6905 | |
| 6906 | def __init__( |
| 6907 | self, |
| 6908 | __argument: Optional[ |
| 6909 | Union[_ColumnsClauseArgument[Any], SelectBase, ScalarSelect[Any]] |
| 6910 | ] = None, |
| 6911 | ): |
| 6912 | s: ScalarSelect[Any] |
| 6913 | |
| 6914 | # TODO: this seems like we should be using coercions for this |
| 6915 | if __argument is None: |
| 6916 | s = Select(literal_column("*")).scalar_subquery() |
| 6917 | elif isinstance(__argument, SelectBase): |
| 6918 | s = __argument.scalar_subquery() |
| 6919 | s._propagate_attrs = __argument._propagate_attrs |
| 6920 | elif isinstance(__argument, ScalarSelect): |
| 6921 | s = __argument |
| 6922 | else: |
| 6923 | s = Select(__argument).scalar_subquery() |
| 6924 | |
| 6925 | UnaryExpression.__init__( |
| 6926 | self, |
| 6927 | s, |
| 6928 | operator=operators.exists, |
| 6929 | type_=type_api.BOOLEANTYPE, |
| 6930 | ) |
| 6931 | |
| 6932 | @util.ro_non_memoized_property |
| 6933 | def _from_objects(self) -> List[FromClause]: |
nothing calls this directly
no test coverage detected