java-driver
java-driver copied to clipboard
Add BYPASS CACHE and USING TIMEOUT capabilities to mapper
Now Select, Insert and Update annotations used in DAOs can specify (usingTimeout = "durationString") in order to use Scylla CQL extension timeouts.
My sincerest apologies to owners of Select, Insert and Update accounts that I've accidentally tagged. Feel free to review though.
I've decided to go with "usingTimeout" to make it more distinct from @StatementAttributes(timeout) which AFAIK is a driver-side timeout.
Ping - any updates to this PR?
@Bouncheck / @avelanarius what is this one waiting for? Can we get a peer review in parallel?
Ping.
Thanks for the review, I see good points being raised. It has been a while so i may need to retrace some decisions I've made, but I'll try to address everything.
USING TIMEOUT is added to select insert and update - what about delete and batch?
I've limited this change to queries mentioned in #168. Delete does not seem to support using timeout in QueryBuilder yet. I haven't seen batch and truncate used anywhere in mapper.
PR title mentions BYPASS CACHE [...], but there is no mention in PR description
Added mention in description.
Tests
Added tests that verify generated code, Added integration tests that run correct statements with valid timeouts, Added tests with invalid timeouts and valid but too low timeout, Duplicated some integration tests for Select annotation but with added bypass cache so that at least we know it does not break