Repository navigation
Conversation
aschenzle
changed the base branch from
fix/dynamodb-insertion-primary-keys
to
aschenzle/base-genes-plus-pk
November 28, 2026 01:08
aschenzle
force-pushed
the
feat/ddb-collections-dto-dsl-controller
branch
2 times, most recently
from
December 2, 2026 06:42
b7a8a8c to
3b9ba9c
Compare
aschenzle
changed the base branch from
aschenzle/base-genes-plus-pk
to
feat/heterogeneous-list-gene
December 2, 2026 06:48
jgaleotti
approved these changes
Dec 2, 2026
| public Map<String, DynamoDbAttributeValueDto> mapValue; | ||
|
|
||
| /** List of child attributes for LIST-typed values. */ | ||
| public List<DynamoDbAttributeValueDto> listValue; |
Collaborator
There was a problem hiding this comment.
is this listValue the same as mapValue.values() ?
Collaborator
Author
There was a problem hiding this comment.
No, mapValue and listValue are mutually exclusive payload fields for two distinct DynamoDB types (M vs L)
aschenzle
force-pushed
the
feat/ddb-collections-dto-dsl-controller
branch
from
December 4, 2026 04:45
3b9ba9c to
4ee2e46
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Extends DynamoDB insertion DTOs, template extraction, reflection-based SDK writes, and the generated-test DSL in
client-java/controller-apiandclient-java/controllerto support nested documents (MAP,LIST,NULL) and sets (STRING_SET/SS,NUMBER_SET/NS) — including sets nested inside lists and maps.Because sets are not a native JSON type, the DSL uses .ddbJson and does the corresponding parsings. The alternative to this was a rich DSL with support for nested types (methods like .numberset, .stringset, .list, etc) which seemed overkill (no other DB engine does that)
This PR is scoped to
client-java/controller-apiandclient-java/controller. Needed to include some changes on core because of the rename of a DTO. In follow-up PRs will eliminate the DTO fromcoreand replace with a mirrored class as discussed with Andrea.DynamoDB binary (
B) and binary set (BS) types remain unsupported and are explicitly rejected/documented.client-java/controller-apiDynamoDbScalarTypeDtowithDynamoDbKeyScalarTypeDtofor primary-key metadata (DynamoDbFailedQuery,DynamoDbPrimaryKey).DynamoDbValueTypeDtocoveringSTRING(S),NUMBER(N),BOOLEAN(BOOL),NULL(NULL),MAP(M),LIST(L),STRING_SET(SS), andNUMBER_SET(NS), along withBINARY_WIRE_CODE("B"),BINARY_SET_WIRE_CODE("BS"), andfromWireCode(String)(which rejectsB,BS,null, and unknown wire codes).DynamoDbAttributeValueDtoto represent recursive trees (mapValue,listValue,setValue) and updatedequals/hashCode.DynamoDbDtoUtils(fromPlainValue/toPlainValue) to convert between plain Java values (preservingBigDecimalprecision and deterministic key/set ordering) and typedDynamoDbAttributeValueDtotrees while rejecting empty sets,B, andBS.DynamoDbInsertionKeyBuilderwith deterministic, length-delimited serialization for nestedMAP/LISTpayloads and sortedSTRING_SET/NUMBER_SETvalues to prevent structural collisions.client-java/controllerReflectionBasedDynamoDbClientto build SDKAttributeValueobjects recursively forMAP,LIST,NULL,STRING_SET(ss), andNUMBER_SET(ns), validating non-empty sets.DynamoDbHandler(toTemplateAttribute) to delegate toDynamoDbDtoUtils.fromPlainValue(...)and skip/warn viaSimpleLogger.uniqueWarn(...)when encountering unsupported attributes (B,BS, or empty/malformed sets)..json(),.ss(), and.ns()inDynamoDbStatementDsl/DynamoDbDslwith.ddbJson(attributeName, ddbJson)(keeping.d()for scalars).fromDynamoDbJson) supporting nestedM,L,SS,NS,S,N,BOOL, andNULLwhile rejectingB,BS, empty sets, non-string numbers, and malformed payloads.Tests
DynamoDbAttributeValueDtoTest,DynamoDbDtoUtilsTest.DynamoDbInsertionKeyBuilderTest,ReflectionBasedDynamoDbClientTest,ReflectionBasedDynamoDbClientTableTest,DynamoDbDslTest,DynamoDbHandlerTest,DynamoDbInsertionTemplateTest,DynamoDbPrimaryKeyTest.