diff --git a/src-electron/db/query-package.js b/src-electron/db/query-package.js index da61580465..67fcb5ccec 100644 --- a/src-electron/db/query-package.js +++ b/src-electron/db/query-package.js @@ -693,14 +693,15 @@ async function getAllPackages(db) { /** * Retrieves attribute access interface options from the database. * - * This function performs a complex query to fetch options related to a specific code and package ID. It combines results from + * This function performs a complex query to fetch options related to a specific code and package IDs. It combines results from * the PACKAGE_OPTION table with those from ATTRIBUTE and CLUSTER tables using a UNION. The purpose is to gather a comprehensive * list of options that include both direct package options and those inferred from attributes' storage policies and their associated - * clusters. + * clusters. It supports querying for multiple package IDs by ensuring the packageIds parameter is treated as an array, allowing + * for more flexible queries. * * @param {Object} db - The database connection object. * @param {string} code - The option code or storage policy code to query for. - * @param {number} packageId - The ID of the package to which the options are related. + * @param {number|Array} packageIds - The ID(s) of the package(s) to which the options are related. Can be a single ID or an array of IDs. * @returns {Promise} A promise that resolves to an array of option objects, each containing the option category, code, and label. */ async function getAttributeAccessInterface(db, code, packageIds) { diff --git a/src-electron/sdk/matter.js b/src-electron/sdk/matter.js index d430628b33..c3e6a8f477 100644 --- a/src-electron/sdk/matter.js +++ b/src-electron/sdk/matter.js @@ -26,7 +26,7 @@ const dbEnum = require('../../src-shared/db-enum.js') * associated with the specified package ID. * * @param {Object} db - Database connection object. - * @param {Number} packageId - The ID of the package to query. + * @param {Number} packageIds - The ID of the packages to query. * @returns {Promise} A promise that resolves to an array of forced external storage settings. */