-
Notifications
You must be signed in to change notification settings - Fork 11
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
Refactor CRUDOperationOptions to a hierarchy of classes #258
Conversation
Add base options class and fluent builders for CRUD operation options.
285f8a3
to
8b2845e
Compare
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.
I've been trying to merge two Builders in class and came to the conclusion your solution is probably the best way. But we need to add javadocs to Builders because it's too complicated and may misunderstanding or I've never seen this pattern before
Then after merging your PR I will add public methods for ProxyTarantoolSpace operations with CRUD*OperationOptions. 'Cause I think it's the only way we can follow.
Also don't forget to add few words to the Changelog, I know that is internal, but I'm thinking all changes are important
src/main/java/io/tarantool/driver/core/proxy/CRUDBaseOperationOptions.java
Outdated
Show resolved
Hide resolved
src/main/java/io/tarantool/driver/core/proxy/CRUDBaseOperationOptions.java
Outdated
Show resolved
Hide resolved
src/main/java/io/tarantool/driver/core/proxy/CRUDBaseOperationOptions.java
Outdated
Show resolved
Hide resolved
src/main/java/io/tarantool/driver/core/proxy/CRUDSelectOperationOptions.java
Outdated
Show resolved
Hide resolved
src/main/java/io/tarantool/driver/core/proxy/CRUDSelectOperationOptions.java
Outdated
Show resolved
Hide resolved
I decided to not add the changelog now because I'm going to push another PR immediately with the batch options and there I can add the changelog entry for all changes. |
NB: we cannot use these CRUD*Options classes for representing the user-defined operation options. These are internal containers for passing the options to tarantool/crud API and they include the values from Conditions, for example. These classes are internal and shouldn't leak to API. For the API, we will have to prepare another hierarchy of options classes, with different available fields and obviously without CRUD prefix. |
Yep, and passing in I believe we should have implemented API that as close as possible to the original API and futher will add easy to use constructions. But now we have what we have. And I agree with you that's we need another Options hierarchy so as not to multiply collisions but we will have exactly same structure like CrudBase*Options except options from |
I didn't forget about
Affects #259