-
Notifications
You must be signed in to change notification settings - Fork 192
Fix collections on transaction query. #1571
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
Fix collections on transaction query. #1571
Conversation
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.
Should @programmatix also review this?
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.
Yes, @programmatix could review it as well. For some reason I can't select him as a reviewer.
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'm going to merge this without review from @programmatix as he is feeling under the weather today.
return (AttemptContextReactiveAccessor.createReactiveTransactionAttemptContext(s.get().getCore(), | ||
clientFactory.getCluster().environment().jsonSerializer())).query(statement, opts); | ||
JsonSerializer jSer = clientFactory.getCluster().environment().jsonSerializer(); | ||
return AttemptContextReactiveAccessor.createReactiveTransactionAttemptContext(s.get().getCore(), jSer) |
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.
The TransactionAttemptContext.query overload that takes a Scope doesn't explicitly mark that as being @nullable (and in fact arguably should be checking it's not-null), so it would be less brittle if this code followed the specced API like so:
if (rs.name.equals(DEFAULT_SCOPE)) {
ctx.query(statement, opts);
}
else {
ctx.query(rs, statement, opts);
}
But it's ok. I'll just have to be careful to never change my interface to require scope to be non-null.
Closes #1569.