A fluent builder for querying items in a DynamoDB table or index.
Supports key conditions, filters, projections, sorting, pagination, and
global secondary index usage. Part of the DynamoDB Simplified library.
Executes the query and returns all matching items aggregated from all pages.
Memory warning: all results are loaded into memory. For large result sets,
consider using executeStream() for lazy iteration or executeWithPagination()
for page-by-page processing.
Executes the query and returns the first matching item, if any.
Returns:
an Optional containing the first item, or empty if no items match
count
publiclongcount()
Returns the total number of matching items by iterating all query result pages.
When a low-level DynamoDbClient is available, uses Select.COUNT
server-side to avoid transferring item data. Falls back to the enhanced client
page iteration otherwise.