sdk2 comment #188
Labels
closing-soon
This issue will close in 4 days unless further comments are made.
guidance
Question that needs advice or information.
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.
I am trying the sdk v2, dynamodb. Overall I like it, and was interested in the async code.
A few issues - maybe I simply cant find the right classes.
As a bonus, Im using kotlin (jvm) and have little problems interfacing.
I got the document model working fairly well then I tried converting to the async client
to discover that the document api doesn't accept an async client.
The code to do a batch write (or nearly any ddb code) is extremely verbose and tedious.
Considering that most of the document api is simply providing a simpler way to construct the
same payload - but using essentially the same abstraction 1:1 -- this was painful.
Even with kotlin's conciseness what was a few lines of code became 20+ -- for just a 3 attribute item.
I like the builder's in concept but in many cases, like the one above, where every single attribute value, item, request etc requires a builder and build its very tedious to write ..
BatchPutItemRequest.builder()..... ( WriteItem.builder()..... Item.builder().... AttributeValue.builder.... build() build() build() build() build() ... took 15 minutes to match the parens.
If everything needs to be a builder, maybe there's a way to avoid having to explicitly call builder() and build() for everything -- why not make the Request objects' builders and build them when they are
passed as arguments to the requests.
The text was updated successfully, but these errors were encountered: