-
Notifications
You must be signed in to change notification settings - Fork 16
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
Changes for indexing option - create collection and cache #771
Conversation
src/main/java/io/stargate/sgv2/jsonapi/service/cqldriver/executor/CollectionSettings.java
Show resolved
Hide resolved
...va/io/stargate/sgv2/jsonapi/service/resolver/model/impl/CreateCollectionCommandResolver.java
Show resolved
Hide resolved
src/main/java/io/stargate/sgv2/jsonapi/api/model/command/impl/CreateCollectionCommand.java
Show resolved
Hide resolved
type = SchemaType.ARRAY, | ||
implementation = String.class) | ||
@Nullable | ||
List<String> deny) {} |
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.
As per my note below, I think validation could be encapsulated within config class itself; either in (canonical) constructor, or, maybe cleaner, in a create(...)
method that verifies everything is good (and if not throws exception), then calls canonical constructor.
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.
Thought about it., For this need to create separate validators to verify things like either one of the field can only be used. So decided to do it as part of resolver.
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.
By validator I didn't mean anything pluggable or related to Quarkus.
...va/io/stargate/sgv2/jsonapi/service/resolver/model/impl/CreateCollectionCommandResolver.java
Show resolved
Hide resolved
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.
Looks good overall, added some suggestions for refactoring.
Ok, I'll read through everything once more (in a bit, offline for an hour), to make sure I get the overall thing right. |
src/main/java/io/stargate/sgv2/jsonapi/api/model/command/impl/CreateCollectionCommand.java
Show resolved
Hide resolved
src/main/java/io/stargate/sgv2/jsonapi/api/model/command/impl/CreateCollectionCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/io/stargate/sgv2/jsonapi/exception/ErrorCode.java
Outdated
Show resolved
Hide resolved
src/main/java/io/stargate/sgv2/jsonapi/service/cqldriver/executor/CollectionSettings.java
Outdated
Show resolved
Hide resolved
...o/stargate/sgv2/jsonapi/service/resolver/model/impl/CreateCollectionCommandResolverTest.java
Outdated
Show resolved
Hide resolved
...o/stargate/sgv2/jsonapi/service/resolver/model/impl/CreateCollectionCommandResolverTest.java
Outdated
Show resolved
Hide resolved
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.
Ok looks good, thank you for taking time to explain where I misunderstood code & constraints.
Added some suggestions as usual; nothing major.
src/main/java/io/stargate/sgv2/jsonapi/api/model/command/impl/CreateCollectionCommand.java
Outdated
Show resolved
Hide resolved
src/test/java/io/stargate/sgv2/jsonapi/api/v1/CreateCollectionIntegrationTest.java
Show resolved
Hide resolved
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.
LGTM 👍
What this PR does:
Added the option to provide fields for indexing - allowed or denied
Add the indexing option to cache
Which issue(s) this PR fixes:
Fixes #765 #766
Checklist