Skip to content

Conversation

@peterbroadhurst
Copy link
Contributor

@peterbroadhurst peterbroadhurst commented Jan 19, 2022

Fixes for #415

The PostgreSQL driver in Go passes Scan a string rather than a []byte when reading data from the database, now that we are using TEXT columns. However, our custom Scan() implementations for these types assumed []byte was being returned (in various spellings of that assumption).

To support environments created before the moved away from BYTEA we cannot take the old Scan() support for []byte. So we need all the objects to support either.

Through incremental e2e test-fix cycles I found the following needed updates:

  1. SQL Migration copy/paste bug from SQLite to PSQL
  2. fftypes.JSONObject
  3. fftypes.JSONObjectArray
  4. fftypes.Batch
  5. fftypes.FFISerializedEvent
  6. fftypes.FFIParams

Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Jan 19, 2022

Codecov Report

Merging #417 (e42e3e1) into main (bdbc50a) will not change coverage.
The diff coverage is 100.00%.

❗ Current head e42e3e1 differs from pull request most recent head 116b45f. Consider uploading reports for the commit 116b45f to get more accurate results
Impacted file tree graph

@@            Coverage Diff            @@
##              main      #417   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          277       277           
  Lines        14845     14852    +7     
=========================================
+ Hits         14845     14852    +7     
Impacted Files Coverage Δ
pkg/fftypes/batch.go 100.00% <100.00%> (ø)
pkg/fftypes/jsonobject.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bdbc50a...116b45f. Read the comment docs.

@peterbroadhurst peterbroadhurst marked this pull request as ready for review January 19, 2022 17:31
@peterbroadhurst peterbroadhurst changed the title PostgreSQL migration updates PostgreSQL updates following merging of onchain-logic branch Jan 19, 2022
@nguyer nguyer merged commit f56d701 into hyperledger:main Jan 19, 2022
@nguyer nguyer deleted the fix-415 branch January 19, 2022 21:38
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.

3 participants