Creates a new instance of AwsDynamoDBWeatherRepository.
The DynamoDB client to use for database operations.
The name of the DynamoDB table containing current weather data.
The name of the DynamoDB table containing average weather data.
Deletes all items with the specified IDs from the current weather table. The deletion is performed in batches due to the database's batch write limit.
An array of IDs representing the items to be deleted. If the array is empty, the method returns without performing any action.
A promise that resolves once all specified items have been deleted.
Gets the most recent weather record from the average weather table for the specified device.
The ID of the device to retrieve the record for.
A promise that resolves to an array containing only the most recent weather record for the device.
Lists weather records from the average weather table based on the provided parameters.
The ID of the device to filter records by. This is a required parameter.
The local date parameter in the format MM-DD-YYYY to filter records by.
A promise that resolves to an array of weather records ordered by timestamp with newest records first.
Groups weather records by their associated device ID.
A promise that resolves to an object mapping device IDs to arrays of weather records.
Saves the provided weather record into the database.
The weather record object to be saved. It includes weather attributes and an identifier.
A promise that resolves to the identifier of the saved record.
Saves the current weather record into the database.
The current weather record to be saved. This object contains the data to persist including an identifier and other weather-related properties.
A promise that resolves to the ID of the saved weather record.
Repository for managing weather data.