#1607 - ENH: Add query.exists() query ... as a convenience for "does a row exist" check

This commit is contained in:
rob bygrave committed 2019-01-09 13:59:53 +13:00
1 parent ab3e6ccbf7
commit 8a34d6050b
10 files changed
+145 -8

No files matched your search

@@ -443,6 +443,11 @@ public class DefaultExpressionList<T> implements SpiExpressionList<T> {
return query.findSingleAttributeList();
}
@Override
public boolean exists() {
return query.exists();
}
@Override
public T findOne() {
return query.findOne();
@@ -99,6 +99,11 @@ public class FilterExpressionList<T> extends DefaultExpressionList<T> {
return rootQuery.findOneOrEmpty();
}
@Override
public boolean exists() {
return rootQuery.exists();
}
@Override
public ExpressionList<T> having() {
throw new PersistenceException(notAllowedMessage);
@@ -375,6 +375,11 @@ class JunctionExpression<T> implements SpiJunction<T>, SpiExpression, Expression
return exprList.apply(fetchPath);
}
@Override
public boolean exists() {
return exprList.exists();
}
@Override
public FutureIds<T> findFutureIds() {
return exprList.findFutureIds();