Skip to content

Common DynamoDb Enhanced interface for "queryable" #3943

Open
@chrylis

Description

@chrylis

Describe the feature

A common interface for DynamoDbTable and DynamoDbIndex defining the scan and query methods.

Use Case

I have some pipeline methods that build QueryConditionals, execute them, and unpack the results. Sometimes these queries are aimed at the base table, and sometimes at GSIs, depending on the sorting criteria. Currently, the table and index interfaces share no common base interface, resulting in code duplication.

Proposed Solution

DynamoDbTable's query and scan methods return PageIterable<T>, which is a subtype of DynamoDbIndex's return type of SdkIterable<Page<T>>. A common interface DynamoDbQueryable<T> could be extended by both the table and index interfaces with no impact to existing code.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS Java SDK version used

2.20.50

JDK version used

openjdk version "17.0.6" 2023-01-17 OpenJDK Runtime Environment Temurin-17.0.6+10 (build 17.0.6+10) OpenJDK 64-Bit Server VM Temurin-17.0.6+10 (build 17.0.6+10, mixed mode, sharing)

Operating System and version

Gentoo Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    dynamodb-enhancedfeature-requestA feature should be added or improved.p3This is a minor priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions