exists method

QuerySingle<(Expr<bool>)> exists()

Check for existance of rows in this Query using EXISTS operator.

This returns a QuerySingle which contains exactly one row. The value of this query will be true, if this Query contains any rows, even if those rows are entirely nulls.

Tip

If you wish to use .exists() in a subquery considering using .asSubQuery.exists() which returns an Expr<bool>.

Implementation

QuerySingle<(Expr<bool>,)> exists() => QuerySingle._(
  Query._(_context, (
    ExistsExpression._(_from(_expressions.toList())),
  ), SelectClause._),
);