Added dev_eui query param to list multicast groups api #728
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.
Summary
This PR adds support for filtering multicast groups by an associated device's DevEUI in the ChirpStack v4 API.
Changes
API (
ListMulticastGroupsRequest
)device_dev_eui
field to allow filtering by device association.Data Layer (
Filters
struct)device_dev_eui: Option<EUI64>
field to store the binary representation of the DevEUI.Query Logic
list
andget_count
functions to:WHERE id IN (SELECT multicast_group_id FROM multicast_group_device WHERE dev_eui = ?)
subselect whendevice_dev_eui
is provided.Motivation
Previously, there was no direct way to retrieve multicast groups associated with a specific device via the API.
This change improves usability by allowing a single API call to return only the multicast groups linked to the provided DevEUI.