-
Notifications
You must be signed in to change notification settings - Fork 12
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
WIP: split-table: split Table interface by behavior #13
base: main
Are you sure you want to change the base?
Conversation
public interface BaseTable<T extends Entity<T>> { | ||
Class<T> getType(); | ||
|
||
FirstLevelCache getFirstLevelCache(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function had default realization, which returned null; I think it isn't needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function should not be in Table, ever.
Strange that we have it there now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it using in default Table methods. Do you think that its better to leave it in Table?
} | ||
|
||
default <ID extends Entity.Id<T>> void delete(Range<ID> range) { | ||
findIds(range).forEach(this::delete); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was marked with unsafe, but it don't look like it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default implementation is safe but YDB implementation isnlikely a blind delete (without reading rows in the range first)
The Table interface is too huge and contains several entities that are well separated by behavior. To simplify navigation and plan a little for the future, I propose to distribute methods from Table to new interfaces