Skip to content

Commit

Permalink
refactor: update delete structure removing collector
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Santana <[email protected]>
  • Loading branch information
otaviojava committed Nov 29, 2023
1 parent 546aeb2 commit d9bec89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/main/java/expert/os/harperdb/Template.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ public <T> boolean upsert(Iterable<T> entities) {
public <K> boolean delete(String table, K id) {
Objects.requireNonNull(table, "table is required");
Objects.requireNonNull(id, "id is required");
var delete = new Delete<>(database, table, Collections.singleton(id), ALL_ATTRIBUTES);
var delete = new Delete<>(database, table, Collections.singleton(id));
return server.execute(delete);
}

public <K, T> boolean delete(Class<T> type, K id) {
Objects.requireNonNull(type, "type is required");
Objects.requireNonNull(id, "id is required");
var delete = new Delete<>(database, table(type), Collections.singleton(id), ALL_ATTRIBUTES);
var delete = new Delete<>(database, table(type), Collections.singleton(id));
return server.execute(delete);
}

Expand All @@ -91,7 +91,7 @@ public <K, T> boolean deleteAllById(Class<T> type, Iterable<K> ids) {
Objects.requireNonNull(ids, "ids is required");
var keys = StreamSupport.stream(ids.spliterator(), false)
.collect(Collectors.toSet());
var delete = new Delete<>(database, table(type), Collections.singleton(keys), ALL_ATTRIBUTES);
var delete = new Delete<>(database, table(type), Collections.singleton(keys));
return server.execute(delete);
}

Expand Down

0 comments on commit d9bec89

Please sign in to comment.