Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 1397 #1398

Merged
merged 19 commits into from
Aug 14, 2024
Merged

Issue 1397 #1398

merged 19 commits into from
Aug 14, 2024

Conversation

paulr34
Copy link
Collaborator

@paulr34 paulr34 commented Aug 9, 2024

Fixes #1397

This pull request retrieves the cluster/attribute pairs for all attributeAccessInterface attributes, including those of the list type.

Background: The ATTRIBUTE table designates CLUSTER_REF as null for global attributes.

To incorporate cluster/attribute pairs that are global attributes, the attributeAccessInterface list from zcl.json needs to be imported into an alternative table, PACKAGE_OPTION.

Given that PACKAGE_OPTION exclusively contains pairs enumerated in zcl.json and does not encompass all attributeAccessInterface pairings, it becomes essential to query both the ATTRIBUTE and PACKAGE_OPTION tables.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.23%. Comparing base (1bf40e8) to head (1f2ec9a).
Report is 41 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1398      +/-   ##
==========================================
+ Coverage   66.00%   66.23%   +0.22%     
==========================================
  Files         194      191       -3     
  Lines       20528    20640     +112     
  Branches     4455     4528      +73     
==========================================
+ Hits        13550    13670     +120     
+ Misses       6978     6970       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src-electron/db/query-package.js Outdated Show resolved Hide resolved
src-electron/db/query-package.js Show resolved Hide resolved
@paulr34 paulr34 requested a review from brdandu August 12, 2024 20:56
src-electron/db/query-impexp.js Outdated Show resolved Hide resolved
src-electron/db/query-package.js Show resolved Hide resolved
src-electron/db/query-package.js Outdated Show resolved Hide resolved
src-electron/db/query-package.js Outdated Show resolved Hide resolved
src-electron/rest/user-data.js Outdated Show resolved Hide resolved
test/matter.test.js Show resolved Hide resolved
@paulr34 paulr34 requested a review from brdandu August 13, 2024 20:08
Copy link
Collaborator

@brdandu brdandu left a comment

Choose a reason for hiding this comment

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

Approving but would like to see array arguments and cleanup as per that.

src-electron/db/query-config.js Show resolved Hide resolved
src-electron/db/query-package.js Show resolved Hide resolved
src-electron/db/query-package.js Show resolved Hide resolved
let queryParams = [code, ...packageIds, code, ...packageIds]

// Since packageIds is now always an array, adjust the query and parameters accordingly
const placeholders = packageIds.map(() => '?').join(', ')
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can do the standard:

IN (${dbApi.toInClause(packageIds)})

@paulr34 paulr34 merged commit fe92d5d into project-chip:master Aug 14, 2024
13 checks passed
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.

List type attributes should be forced external
4 participants