Skip to content

DATACOUCH-1066 - Make QueryCriteria key a N1qlExpression. #1082

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

This is a merge of mmonti's changeset into master. The changeset was made
on top of 4.1.x instead of master so it has a little catching up to do.

Closes #1066

  • 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).

This is a merge of mmonti's changeset into master. The changeset was made
on top of 4.1.x instead of master so it has a little catching up to do.
@mikereiche mikereiche force-pushed the datacouch_1066_make_querycriteria_key_n1qlexpression branch from 4cc7cdb to a1df41d Compare February 17, 2021 02:07
@@ -52,6 +55,7 @@
private final StringBasedN1qlQueryParser queryParser;
private final QueryMethod queryMethod;
private final CouchbaseConverter couchbaseConverter;
private static final SpelExpressionParser SPEL_PARSER = new SpelExpressionParser();
private final N1QLExpression parsedExpression;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Never used. Removing.

@mikereiche mikereiche merged commit 41ee1f9 into master Feb 17, 2021
mikereiche added a commit that referenced this pull request Feb 17, 2021
This is a merge of mmonti's changeset into master. The changeset was made
on top of 4.1.x instead of master so it has a little catching up to do.

Original pull request #1082

Co-authored-by: mikereiche <[email protected]>
@@ -124,7 +126,7 @@ void findByMatchingQuery() {

couchbaseTemplate.upsertById(User.class).all(Arrays.asList(user1, user2, specialUser));

Query specialUsers = new Query(QueryCriteria.where("firstname").like("special"));
Query specialUsers = new Query(QueryCriteria.where(i("firstname")).like("special"));
Copy link
Contributor

Choose a reason for hiding this comment

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

It might already be in the PR, but I wasn't paying close enough attention

But can the value methods take N1QLExpression's to? I can imagine that somewhere someone might want to use a built in N1QL method to compute the value to compare against..

@mikereiche mikereiche deleted the datacouch_1066_make_querycriteria_key_n1qlexpression branch March 15, 2021 19:17
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.

QueryCriteria.where() adds backticks to ALL keys, breaks keys that use META()
2 participants