Skip to content

Add override of toN1qlRemoveString() to StringQuery. #1135

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

Merged

Conversation

mikereiche
Copy link
Collaborator

Closes #1131.

  • You have read the Spring Data contribution guidelines.
  • There is a ticket in the bug tracker for the project in our JIRA.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

@mikereiche mikereiche requested a review from daschl May 3, 2021 19:17
mikereiche added a commit that referenced this pull request May 3, 2021
@mikereiche mikereiche force-pushed the datacouch_1131_implement_string_query_ton1qlremovestring branch from 94dd216 to f1fb77a Compare May 3, 2021 19:21
@@ -323,18 +323,24 @@ public String toN1qlRemoveString(ReactiveCouchbaseTemplate template, String coll
* @return QueryOptions
*/
public QueryOptions buildQueryOptions(QueryScanConsistency scanConsistency) {
final QueryOptions options = QueryOptions.queryOptions();
QueryOptions options = QueryOptions.queryOptions();
if (options == null) { // add/override what we got from PseudoArgs
Copy link
Contributor

Choose a reason for hiding this comment

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

that line does not make sense, since the line above you always set it to non-null?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right. The code is copied from the Collections branch to reduce the future merge. And in that code 'options' is an argument and needs to be checked.

@@ -73,4 +73,16 @@ public String toN1qlSelectString(ReactiveCouchbaseTemplate template, String coll
appendSkipAndLimit(statement);
return statement.toString();
}

@Override
Copy link
Contributor

Choose a reason for hiding this comment

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

move below block comment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. Will fix.

@mikereiche mikereiche force-pushed the datacouch_1131_implement_string_query_ton1qlremovestring branch from f1fb77a to e9e8411 Compare May 4, 2021 14:02
@mikereiche mikereiche merged commit 36de313 into main May 4, 2021
mikereiche added a commit that referenced this pull request Aug 9, 2021
Closes #1131.
Original pull request: #1135.

Co-authored-by: mikereiche <[email protected]>
@mikereiche mikereiche deleted the datacouch_1131_implement_string_query_ton1qlremovestring branch August 11, 2021 22:08
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.

Delete N1QL query is deleting all documents instead of deleting only documents that matches the criteria
2 participants