Skip to content

Conversation

@steph-torres-nhs
Copy link
Contributor

@steph-torres-nhs steph-torres-nhs commented Dec 17, 2025

Overview

Jira ticket: PRMP-1079

Description

Find another method of returning the expected number of results using a limit and pagination when querying dynamodb

Context

Using a limit along side a filter expression within a dynamodb query doesn't return the number of results as initially expected, the filter is applied after the limit.

Checklist

Tasks for all changes:

@steph-torres-nhs steph-torres-nhs marked this pull request as ready for review December 18, 2025 10:18
@steph-torres-nhs steph-torres-nhs requested review from a team as code owners December 18, 2025 10:18
Comment on lines +470 to +476
if expression_attribute_names:
query_params["ExpressionAttributeNames"] = expression_attribute_names

if expression_attribute_values:
query_params["ExpressionAttributeValues"] = (
serialize_dict_to_dynamodb_object(expression_attribute_values)
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do those two depend on each other?

response["Items"] = [
deserialize_dynamodb_object(item) for item in response["Items"]
]
return response
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use yield here?

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 5, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants