whereExists method
QueryBuilder
whereExists(
- QueryCallback callback, {
- String boolean = 'and',
- bool not = false,
inherited
Implementation
@override
QueryBuilder whereExists(
QueryCallback callback, {
String boolean = 'and',
bool not = false,
}) {
QueryBuilder subQuery = QueryBuilderImpl();
callback(subQuery);
String condition = "${not ? 'NOT EXISTS' : 'EXISTS'} (${subQuery.toSql()})";
_appendCondition(
condition,
isOr: (boolean.toLowerCase() == 'or'),
);
bindings.addAll(subQuery.getBindings());
return this;
}