-
Notifications
You must be signed in to change notification settings - Fork 1
Added missing properties. Fixed dynamo ops #63
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
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
17 changes: 17 additions & 0 deletions
17
src/Clients/Goa.Clients.Dynamo/Enums/ReturnValuesOnConditionCheckFailure.cs
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,17 @@ | ||
| namespace Goa.Clients.Dynamo.Enums; | ||
|
|
||
| /// <summary> | ||
| /// Specifies how to return attribute values when a condition check fails. | ||
| /// </summary> | ||
| public enum ReturnValuesOnConditionCheckFailure | ||
| { | ||
| /// <summary> | ||
| /// Nothing is returned. (This is the default.) | ||
| /// </summary> | ||
| NONE, | ||
|
|
||
| /// <summary> | ||
| /// Returns all attributes of the item as they appeared before the operation. | ||
| /// </summary> | ||
| ALL_OLD | ||
| } |
18 changes: 18 additions & 0 deletions
18
src/Clients/Goa.Clients.Dynamo/Models/ItemCollectionMetrics.cs
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,18 @@ | ||
| namespace Goa.Clients.Dynamo.Models; | ||
|
|
||
| /// <summary> | ||
| /// Information about item collections, if any, that were affected by the operation. | ||
| /// </summary> | ||
| public class ItemCollectionMetrics | ||
| { | ||
| /// <summary> | ||
| /// The partition key value of the item collection. | ||
| /// </summary> | ||
| public Dictionary<string, AttributeValue>? ItemCollectionKey { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// An estimate of item collection size, in gigabytes. This value is a two-element array | ||
| /// containing a lower bound and an upper bound for the estimate. | ||
| /// </summary> | ||
| public List<double>? SizeEstimateRangeGB { get; set; } | ||
| } |
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
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
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
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
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
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
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.
🧩 Analysis chain
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 1599
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 493
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 126
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 128
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 595
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 2759
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 5725
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 1002
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 428
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 35
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 283
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 35
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 1737
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 379
🏁 Script executed:
rg "ReturnValuesOnConditionCheckFailure" --type csRepository: Im5tu/goa
Length of output: 2823
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 1827
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 510
🏁 Script executed:
fd -t f "Dynamo.*Test" tests/Clients/Goa.Clients.Dynamo.Tests/Repository: Im5tu/goa
Length of output: 254
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 630
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 35
🏁 Script executed:
rg "DeleteItem" tests/Clients/Goa.Clients.Dynamo.Tests/ -C 3Repository: Im5tu/goa
Length of output: 10190
🏁 Script executed:
rg "ReturnValuesOnConditionCheckFailure" tests/ -C 2Repository: Im5tu/goa
Length of output: 35
🏁 Script executed:
cat -n tests/Clients/Goa.Clients.Dynamo.Tests/DynamoClientIntegrationTests.cs | head -100Repository: Im5tu/goa
Length of output: 3900
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 315
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 785
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 35
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 100
🏁 Script executed:
cat -n $(fd -t f "DynamoClient" | grep -v Test | head -1)Repository: Im5tu/goa
Length of output: 6315
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 102
🏁 Script executed:
rg "class DynamoClient" src/Clients/Goa.Clients.Dynamo/Repository: Im5tu/goa
Length of output: 35
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 220
🏁 Script executed:
cat -n src/Clients/Goa.Clients.Dynamo/DynamoServiceClient.cs | head -150Repository: Im5tu/goa
Length of output: 7640
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 3678
🏁 Script executed:
rg "ReturnValuesOnConditionCheckFailure" src/Clients/Goa.Clients.Dynamo/Serialization/Repository: Im5tu/goa
Length of output: 35
🏁 Script executed:
rg "UseStringEnumConverter\|JsonConverter\|ReturnValuesOnConditionCheckFailure" src/Clients/Goa.Clients.Dynamo/Serialization/ -A 2 -B 2Repository: Im5tu/goa
Length of output: 35
🏁 Script executed:
grep -n "ReturnValuesOnConditionCheckFailure" src/Clients/Goa.Clients.Dynamo/Serialization/DynamoJsonContext.csRepository: Im5tu/goa
Length of output: 35
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 37
🌐 Web query:
AWS DynamoDB DeleteItem API ReturnValuesOnConditionCheckFailure parameter valid values enum💡 Result:
Valid values: ALL_OLD and NONE. [1][2]
Sources:
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 431
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 463
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 93
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 139
🏁 Script executed:
Repository: Im5tu/goa
Length of output: 100
🏁 Script executed:
rg "WithReturnValuesOnConditionCheckFailure\|ReturnValuesOnConditionCheckFailure\s*=" tests/ -C 2Repository: Im5tu/goa
Length of output: 35
Add
ReturnValuesOnConditionCheckFailureto the serialization context and add test coverage.While the enum values (
NONE,ALL_OLD) correctly match AWS DynamoDB's DeleteItem API contract and the property is properly integrated into the request/builder, two issues need addressing:The enum should be explicitly registered in
DynamoJsonContextas[JsonSerializable(typeof(ReturnValuesOnConditionCheckFailure))](lines 19-62) for consistency with similar enums likeReturnValues,ReturnConsumedCapacity, andReturnItemCollectionMetrics, even though the globalUseStringEnumConvertersetting may handle it implicitly.Add a test case for
WithReturnValuesOnConditionCheckFailure()to verify the property is correctly serialized and sent to DynamoDB, similar to existing builder tests.🤖 Prompt for AI Agents