-
Notifications
You must be signed in to change notification settings - Fork 597
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
feat(lib-dynamodb): add DynamoDB DocumentClient #2097
Conversation
.../main/java/software/amazon/smithy/aws/typescript/codegen/DocumentClientCommandGenerator.java
Show resolved
Hide resolved
.../main/java/software/amazon/smithy/aws/typescript/codegen/DocumentClientCommandGenerator.java
Outdated
Show resolved
Hide resolved
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.
Overall this is very good. Its the same API as the DB Client, abstracts all the marshalling, and is easy to construct.
There are some minor-to-medium inefficiencies that I've noted, but even if they are not resolved I would be happy to use 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.
Very solid PR. Had a few minor comments.
@@ -0,0 +1,78 @@ | |||
import { marshall, marshallOptions, unmarshall, unmarshallOptions } from "@aws-sdk/util-dynamodb"; |
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.
We can put the utils back to the lib-dynamodb
source code and not to overwrite it during the codegen. It would be easier to maintain.
.../main/java/software/amazon/smithy/aws/typescript/codegen/DocumentClientCommandGenerator.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## main #2097 +/- ##
=======================================
Coverage ? 78.67%
=======================================
Files ? 379
Lines ? 16050
Branches ? 3434
=======================================
Hits ? 12628
Misses ? 3422
Partials ? 0 Continue to review full report at Codecov.
|
fa96558
to
396cbf2
Compare
396cbf2
to
e324af4
Compare
Swithching back to no-op. The behavior should be removing the reference of provided DynamoDB client, so that document client can't make further calls. This reverts commit e324af4.
Co-authored-by: AllanZhengYP <zheallan@amazon.com>
…of that in DynamoDB
…rent of that in DynamoDB
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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.
Thank a lot for putting this together! 🚢
One of my previous nit comment was not addressed: comment.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Issue
Fixes: #1223
Description
The document client simplifies working with items in Amazon DynamoDB by abstracting away the notion of attribute values. This abstraction annotates native JavaScript types supplied as input parameters, as well as converts annotated response data to native JavaScript types.
Usage example for bare-bones DynamoDB document client:
Usage example for v2 backward-compatible full DynamoDB document client:
Testing
get/put/delete operations
batchGet/batchWrite operations
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.