exists method
Checks whether the current query yields at least one row.
Implementation
Future<bool> exists({
ExecutionOptions options = const ExecutionOptions(),
}) async {
final inner = take(queryState.limit == 0 ? 0 : 1).compile();
final result = await database.execute(
SqlCommand('SELECT EXISTS (${inner.sql})', inner.parameters),
options: options,
);
return Codecs.boolean.decode(result.rows.single.single);
}