Skip to content

Commit

Permalink
Query multiple tables using one entity (review comments)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergei Galiamichev committed Nov 27, 2024
1 parent 9a9ad4e commit ec7d303
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ abstract class BatchFindSpliterator<R, T extends Entity<T>, ID extends Entity.Id

protected abstract List<R> find(YqlStatementPart<?> part, YqlStatementPart<?>... otherParts);

BatchFindSpliterator(Class<T> entityType, int batchSize) {
this(entityType, null, batchSize);
}

BatchFindSpliterator(Class<T> entityType, ID partial, int batchSize) {
this(EntityIdSchema.ofEntity(entityType), partial, batchSize);
}

BatchFindSpliterator(EntityIdSchema<ID> idSchema, ID partial, int batchSize) {
this.batchSize = batchSize;
this.idSchema = idSchema;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import javax.annotation.Nullable;

@ExperimentalApi(issue = "https://github.com/ydb-platform/yoj-project/issues/32")
public record EntityDescriptor<E extends Entity<E>>(Class<E> clazz, @Nullable String tableName) {
public record EntityDescriptor<E extends Entity<E>>(@NonNull Class<E> clazz, @Nullable String tableName) {
public String getTableName(@NonNull EntitySchema<?> schema) {
return tableName != null ? tableName : schema.getName();
}
Expand Down

0 comments on commit ec7d303

Please sign in to comment.