Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove static findIn() method from YqlStatement #103

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

lavrukov
Copy link
Contributor

@lavrukov lavrukov commented Dec 4, 2024

No description provided.

@lavrukov lavrukov changed the title Table refactoring rem find in Remove static findIn() method from YqlStatement Dec 4, 2024
@lavrukov lavrukov changed the base branch from main to table-refactoring-rem-find December 4, 2024 09:54
@lavrukov lavrukov force-pushed the table-refactoring-rem-find-in branch from fc72a23 to b11a0fa Compare December 4, 2024 10:02
Copy link
Collaborator

@nvamelichev nvamelichev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM overall, minor stylistic changes requested

}

@Override
public <V extends View, ID extends Id<T>> List<V> find(Class<V> viewType, Set<ID> ids, @Nullable FilterExpression<T> filter, @Nullable OrderExpression<T> orderBy, @Nullable Integer limit) {
if (ids.isEmpty()) {
return List.of();
}
return executor.execute(YqlStatement.findIn(type, viewType, ids, filter, orderBy, limit), ids);
ViewSchema<V> viewSchema = ViewSchema.of(viewType);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: style: var viewSchema will look better here, I think

}

@Override
public <V extends View, K> List<V> find(Class<V> viewType, String indexName, Set<K> keys, @Nullable FilterExpression<T> filter, @Nullable OrderExpression<T> orderBy, @Nullable Integer limit) {
if (keys.isEmpty()) {
return List.of();
}
return executor.execute(YqlStatement.findIn(type, viewType, indexName, keys, filter, orderBy, limit), keys);
ViewSchema<V> viewSchema = ViewSchema.of(viewType);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: style: var viewSchema will look better here, I think

@@ -416,7 +423,10 @@ public <ID extends Id<T>> List<ID> findIds(Set<ID> partialIds) {
if (partialIds.isEmpty()) {
return List.of();
}
return executor.execute(YqlStatement.findIdsIn(type, partialIds, null, defaultOrder(type), null), partialIds);
OrderExpression<T> order = defaultOrder(type);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: style: var order and var idSchema will look better here, I think

Base automatically changed from table-refactoring-rem-find to main December 4, 2024 20:50
@lavrukov lavrukov force-pushed the table-refactoring-rem-find-in branch from b11a0fa to b21b4bd Compare December 4, 2024 20:51
@lavrukov lavrukov merged commit b75598c into main Dec 4, 2024
1 check passed
@lavrukov lavrukov deleted the table-refactoring-rem-find-in branch December 4, 2024 20:55
nvamelichev pushed a commit that referenced this pull request Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants