This commit is contained in:
@@ -601,7 +601,7 @@ public class DataJdbcSource extends DataSqlSource<Connection> {
|
||||
ps.close();
|
||||
return CompletableFuture.completedFuture(new Sheet<>(total, list));
|
||||
} catch (SQLException e) {
|
||||
if (info.getTableStrategy() != null && info.isTableNotExist(e)) return CompletableFuture.completedFuture(new Sheet<>());
|
||||
if (info.getTableStrategy() != null && info.isTableNotExist(e)) return CompletableFuture.completedFuture(new Sheet<>(0, new ArrayList()));
|
||||
CompletableFuture future = new CompletableFuture();
|
||||
future.completeExceptionally(e);
|
||||
return future;//return CompletableFuture.failedFuture(e);
|
||||
|
||||
@@ -150,7 +150,7 @@ public class DataMemorySource extends DataSqlSource<Void> {
|
||||
|
||||
@Override
|
||||
protected <T> CompletableFuture<Sheet<T>> querySheetDB(EntityInfo<T> info, final boolean readcache, boolean needtotal, final boolean distinct, SelectColumn selects, Flipper flipper, FilterNode node) {
|
||||
return CompletableFuture.completedFuture(new Sheet<>());
|
||||
return CompletableFuture.completedFuture(new Sheet<>(0, new ArrayList()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ public final class EntityCache<T> {
|
||||
if (distinct) stream = distinctStream(stream, keyattrs);
|
||||
total = stream.count();
|
||||
}
|
||||
if (needtotal && total == 0) return new Sheet<>();
|
||||
if (needtotal && total == 0) return new Sheet<>(0, new ArrayList());
|
||||
Stream<T> stream = this.list.stream();
|
||||
if (filter != null) stream = stream.filter(filter);
|
||||
if (distinct) stream = distinctStream(stream, keyattrs);
|
||||
|
||||
Reference in New Issue
Block a user