-
Notifications
You must be signed in to change notification settings - Fork 1k
Add support for strategy-based UUID auto-generation (@DynamoDbAutoGeneratedUuid) #6373
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
Open
anasatirbasa
wants to merge
34
commits into
aws:master
Choose a base branch
from
anasatirbasa:feature/define-dynamo-db-autogenerated-key-annotation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
7cec4a2
Added support for DynamoDbAutoGeneratedKey annotation
anasatirbasa 8b80b18
Merge branch 'master' into feature/define-dynamo-db-autogenerated-key…
anasatirbasa d615605
Added support for DynamoDbAutoGeneratedKey annotation
anasatirbasa da14ad5
Merge branch 'master' into feature/define-dynamo-db-autogenerated-key…
anasatirbasa 031ef44
Added support for DynamoDbAutoGeneratedKey annotation
anasatirbasa a47b1d7
Merge branch 'master' into feature/define-dynamo-db-autogenerated-key…
anasatirbasa 0a29161
Merge branch 'master' into feature/define-dynamo-db-autogenerated-key…
anasatirbasa 1bf7a3a
Merge branch 'aws:master' into feature/define-dynamo-db-autogenerated…
anasatirbasa 8c4826d
Increased unit and integration test coverage to 100%
anasatirbasa 8a3048f
Merge branch 'master' into feature/define-dynamo-db-autogenerated-key…
anasatirbasa 79ba90f
Increased code coverage
anasatirbasa 459fae8
Merge branch 'master' into feature/define-dynamo-db-autogenerated-key…
anasatirbasa 8ae8405
Tests refactoring
anasatirbasa 08012f9
Tests refactoring
anasatirbasa 67cd161
Addressed PR feedback and refactored tests
anasatirbasa a4bfb1e
Addressed PR feedback
anasatirbasa fd877c7
Merge branch 'master' into feature/define-dynamo-db-autogenerated-key…
anasatirbasa bbd03ac
Added tests with composite gsi
anasatirbasa e654ef5
Added tests with composite gsi
anasatirbasa 8c3d7d1
Added tests with composite gsi
anasatirbasa 6d66b77
Added tests with composite gsi
anasatirbasa 5bad65a
Merge branch 'master' into feature/define-dynamo-db-autogenerated-key…
anasatirbasa b935acf
Fixed assertions on generated uuids
anasatirbasa 45c4000
Merge remote-tracking branch 'origin/feature/define-dynamo-db-autogen…
anasatirbasa 407703e
Merge branch 'master' into feature/define-dynamo-db-autogenerated-key…
anasatirbasa 9a44ed2
Merge branch 'master' into feature/define-dynamo-db-autogenerated-key…
anasatirbasa dea26e0
Merge branch 'master' into feature/define-dynamo-db-autogenerated-key…
anasatirbasa defb044
Merge remote-tracking branch 'origin/feature/define-dynamo-db-autogen…
anasatirbasa 8b057b5
Merge branch 'master' into feature/define-dynamo-db-autogenerated-key…
anasatirbasa 68ca368
Merge branch 'master' into feature/define-dynamo-db-autogenerated-key…
anasatirbasa ae9e8ad
Add support for strategy-based UUID auto-generation (@DynamoDbAutoGen…
anasatirbasa b72323f
Merge branch 'master' into feature/define-dynamo-db-autogenerated-key…
anasatirbasa 0cdc2c2
Addressed PR comments
anasatirbasa 9fe582f
Javadoc update for DynamoDbAutoGenerateStrategy and DynamoDbAutoGener…
andreas-grafenberger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
.changes/next-release/feature-AmazonDynamoDBEnhancedClient-cbcc2bb.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "type": "feature", | ||
| "category": "Amazon DynamoDB Enhanced Client", | ||
| "contributor": "", | ||
| "description": "Added strategy-based UUID generation to DynamoDbAutoGeneratedUuid with ALWAYS (default) and CREATE modes." | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
.../amazon/awssdk/enhanced/dynamodb/extensions/annotations/DynamoDbAutoGenerateStrategy.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| /* | ||
| * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"). | ||
| * You may not use this file except in compliance with the License. | ||
| * A copy of the License is located at | ||
| * | ||
| * http://aws.amazon.com/apache2.0 | ||
| * | ||
| * or in the "license" file accompanying this file. This file is distributed | ||
| * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
| * express or implied. See the License for the specific language governing | ||
| * permissions and limitations under the License. | ||
| */ | ||
|
|
||
| package software.amazon.awssdk.enhanced.dynamodb.extensions.annotations; | ||
|
|
||
| import software.amazon.awssdk.annotations.SdkPublicApi; | ||
|
|
||
| /** | ||
| * Strategy used to decide when a new value is generated for an annotated attribute. | ||
| */ | ||
| @SdkPublicApi | ||
| public enum DynamoDbAutoGenerateStrategy { | ||
| /** | ||
| * Generate a new value on every write operation. | ||
| */ | ||
| ALWAYS, | ||
|
|
||
| /** | ||
| * Generate a value only when the current value is missing. | ||
| */ | ||
| CREATE | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...namodb-enhanced/src/test/java/software/amazon/awssdk/enhanced/dynamodb/UuidTestUtils.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| /* | ||
| * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"). | ||
| * You may not use this file except in compliance with the License. | ||
| * A copy of the License is located at | ||
| * | ||
| * http://aws.amazon.com/apache2.0 | ||
| * | ||
| * or in the "license" file accompanying this file. This file is distributed | ||
| * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
| * express or implied. See the License for the specific language governing | ||
| * permissions and limitations under the License. | ||
| */ | ||
|
|
||
| package software.amazon.awssdk.enhanced.dynamodb; | ||
|
|
||
| import java.util.UUID; | ||
|
|
||
| public final class UuidTestUtils { | ||
|
|
||
| private UuidTestUtils() { | ||
| } | ||
|
|
||
| public static boolean isValidUuid(String uuid) { | ||
| try { | ||
| UUID.fromString(uuid); | ||
| return true; | ||
| } catch (Exception e) { | ||
| return false; | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.
please dont apply suggestion through the github UI. This is meant to replace 124-128