Skip to content

JAVA-2555: Generate append/prepend constructs compatible with legacy C* versions#1379

Merged
adutra merged 7 commits into
4.xfrom
java2555
Jan 8, 2020
Merged

JAVA-2555: Generate append/prepend constructs compatible with legacy C* versions#1379
adutra merged 7 commits into
4.xfrom
java2555

Conversation

@adutra
Copy link
Copy Markdown
Contributor

@adutra adutra commented Dec 23, 2019

I'm also proposing a fix for JAVA-2596 since it's entangled.

@adutra adutra added this to the 4.4.0 milestone Dec 23, 2019
.appendListElement("l", literal(1))
.whereColumn("k").isEqualTo(bindMarker())
.build();
// UPDATE foo SET l+=[1] WHERE k=?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this change confuses me, I think that the goal of the ticket is to support += syntax, but here instead we are changing the syntax to value= value+...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No the goal of the ticket is not to support x += y. This is the currently supported syntax, but it has the drawback of not being available for C* < 3.10. The goal is to use the old, alternative syntax x = x + y, which is more widely supported.

Comment thread manual/query_builder/idempotence/README.md Outdated
Comment thread manual/query_builder/idempotence/README.md
// UPDATE foo SET l=l-[myfunc()] WHERE k=?
assert !statement.isIdempotent();
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 I had to refer to the javadocs to remember when terms weren't idempotent, so good thing to mention it in the manual too.

@adutra adutra merged commit d7dab59 into 4.x Jan 8, 2020
@adutra adutra deleted the java2555 branch January 8, 2020 18:09
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.

3 participants