Skip to content

DDB Enhanced: Easier attribute value conversion support #1765

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

Closed
wants to merge 2 commits into from

Conversation

musketyr
Copy link
Contributor

@musketyr musketyr commented Apr 3, 2020

Description

This PR exposes new method convertAttributeValue in the TableSchema to allow easier generalization of the construction of queries.

This is a minimal version of #1757.

Motivation and Context

In version 1, there were API to convert the Java value to the AttributeValue (DynamoDBMapperFieldModel) which is not present in version 2.

See RangeConditionCollector for an example usage with version 1. Exposing the already present information about the attributes enables reimplementing similar behaviour for version 2.

Testing

A new test was added to the existing suite.

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed
  • A short description of the change has been added to the CHANGELOG
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@musketyr
Copy link
Contributor Author

musketyr commented Apr 3, 2020

I will add the changelog once we decide about this PR otherwise I will spend life with merging from master :-)

@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 3, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@codecov-io
Copy link

codecov-io commented Apr 3, 2020

Codecov Report

Merging #1765 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1765      +/-   ##
============================================
- Coverage     76.30%   76.29%   -0.01%     
  Complexity      182      182              
============================================
  Files          1072     1072              
  Lines         32252    32257       +5     
  Branches       2520     2521       +1     
============================================
+ Hits          24610    24611       +1     
- Misses         6401     6404       +3     
- Partials       1241     1242       +1     
Flag Coverage Δ Complexity Δ
#unittests 76.29% <100.00%> (-0.01%) 182.00 <0.00> (ø)
Impacted Files Coverage Δ Complexity Δ
...e/amazon/awssdk/enhanced/dynamodb/TableSchema.java 100.00% <ø> (ø) 0.00 <0.00> (ø)
...ssdk/enhanced/dynamodb/mapper/StaticAttribute.java 100.00% <ø> (ø) 0.00 <0.00> (ø)
...amodb/internal/mapper/ResolvedStaticAttribute.java 91.66% <100.00%> (ø) 0.00 <0.00> (ø)
...ssdk/enhanced/dynamodb/mapper/BeanTableSchema.java 85.24% <100.00%> (+0.12%) 0.00 <0.00> (ø)
...dk/enhanced/dynamodb/mapper/StaticTableSchema.java 89.65% <100.00%> (-0.53%) 0.00 <0.00> (ø)
...mazon/awssdk/utils/async/DelegatingSubscriber.java 77.77% <0.00%> (-22.23%) 0.00% <0.00%> (ø%)
...k/core/pagination/async/ResponsesSubscription.java 68.00% <0.00%> (-16.00%) 0.00% <0.00%> (ø%)
...ssdk/core/internal/async/FileAsyncRequestBody.java 87.61% <0.00%> (+2.85%) 0.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c283043...9601aa3. Read the comment docs.

@musketyr
Copy link
Contributor Author

@bmaizels any more thought on this or #1765?

aws-sdk-java-automation added a commit that referenced this pull request Oct 14, 2021
…9c58b0ba5

Pull request: release <- staging/430e4bc7-832c-4b44-8ac3-77e9c58b0ba5
@github-actions
Copy link

This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to provide a comment or open a new issue.

@github-actions github-actions bot added closing-soon This issue will close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will close in 4 days unless further comments are made. labels Apr 15, 2023
@github-actions github-actions bot closed this Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants