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

Call Features() getter to read DB provider features #1197

Merged
merged 2 commits into from
Mar 6, 2023

Conversation

matthew1001
Copy link
Contributor

@matthew1001 matthew1001 commented Feb 28, 2023

Looking into #1199 (originally due to #1196) it appears that we are referencing the SQLCommon.features struct field expecting it to have the features of the DB provider, but with the refactoring that took place under #1110 the SQLCommon.features field is actually populated by the DB provider. That's because there's now also a Database.features struct field in firefly-common which is the one that's actually been populated.

In this PR I've removed the SQLCommon.features field and where we try to read from it today, used instead the new Features() getter that I've added under firefly-common PR hyperledger/firefly-common#49

This PR will remain in draft until hyperledger/firefly-common#49 is approved and we have a new release of firefly-common to pull in. (firefly-common v1.2.3 now released and pulled in under the latest commit)

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
@codecov-commenter
Copy link

Codecov Report

Merging #1197 (f534c26) into main (7f008a9) will not change coverage.
The diff coverage is 100.00%.

❗ Current head f534c26 differs from pull request most recent head 2b5bb32. Consider uploading reports for the commit 2b5bb32 to get more accurate results

@@            Coverage Diff            @@
##              main     #1197   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          305       305           
  Lines        19966     20057   +91     
=========================================
+ Hits         19966     20057   +91     
Impacted Files Coverage Δ
internal/database/sqlcommon/sqlcommon.go 100.00% <ø> (ø)
internal/database/sqlcommon/blob_sql.go 100.00% <100.00%> (ø)
internal/database/sqlcommon/data_sql.go 100.00% <100.00%> (ø)
internal/database/sqlcommon/event_sql.go 100.00% <100.00%> (ø)
internal/database/sqlcommon/message_sql.go 100.00% <100.00%> (ø)
internal/database/sqlcommon/pin_sql.go 100.00% <100.00%> (ø)
cmd/firefly.go 100.00% <0.00%> (ø)
internal/reference/reference.go 100.00% <0.00%> (ø)
internal/namespace/configreload.go 100.00% <0.00%> (ø)
internal/blockchain/common/common.go 100.00% <0.00%> (ø)
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@matthew1001 matthew1001 marked this pull request as ready for review March 1, 2023 13:47
@matthew1001 matthew1001 changed the title Call Features() getter Call Features() getter to read DB provider features Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants