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

support pgx v5 #94

Merged
merged 8 commits into from
Oct 1, 2022
Merged

support pgx v5 #94

merged 8 commits into from
Oct 1, 2022

Conversation

vadimi
Copy link
Contributor

@vadimi vadimi commented Sep 23, 2022

since pgx v5 contains breaking changes (supports go 1.18+ only) this package also needs to have a version bump - v2

should fix #88

this requires v2 of scany library due to breaking changes
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/georgysavva/scany/dbscan"
"github.com/georgysavva/scany/v2/dbscan"
Copy link

Choose a reason for hiding this comment

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

Aren't you missing this directory from the patch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not really, v2 is the version of the module, so it doesn't need to have a directory

Copy link
Owner

Choose a reason for hiding this comment

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

Agree with @vadimi

Copy link

@lzap lzap Sep 30, 2022

Choose a reason for hiding this comment

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

Thanks, I am still struggling with the "new" module system :-)

@codecov
Copy link

codecov bot commented Sep 29, 2022

Codecov Report

Merging #94 (bcc6d24) into master (5c09502) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master      #94   +/-   ##
=======================================
  Coverage   82.81%   82.81%           
=======================================
  Files           5        5           
  Lines         512      512           
=======================================
  Hits          424      424           
  Misses         73       73           
  Partials       15       15           
Flag Coverage Δ
unittests 82.81% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
sqlscan/sqlscan.go 64.70% <ø> (ø)
pgxscan/pgxscan.go 70.73% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@georgysavva
Copy link
Owner

@vadimi Thank you for your work. It looks great!

I think we also need to update the readme file to use the new module name

@vadimi
Copy link
Contributor Author

vadimi commented Sep 30, 2022

@georgysavva thanks, that makes sense, updated the readme. I also noticed golangci lint is failing, so I updated it to latest to see if it helps.

@lzap
Copy link

lzap commented Sep 30, 2022

Thanks for this, eagerly awaiting this to be released :-)

@darkliquid
Copy link

Looking forward to seeing this released - been on a big OpenTelemetry push recently, so will be nice to be able to use the new support in pgx5 for that.

In the mean time, I've been using a replace directive in my go.mod to allow me to use this PR.

replace github.com/georgysavva/scany/v2 => github.com/vadimi/scany/v2 v2.0.0-20220923222004-64484fa02b2c

@lzap
Copy link

lzap commented Sep 30, 2022

Hands up who's reason is OpenTelemetry too! :-) Thanks, nice trick actually. Had no idea it works remotely too.

@georgysavva
Copy link
Owner

@vadimi Thanks for updating the readme!

Yes, I also noticed that golangci-lint is broken. I fixed it in the master, along with other GitHub action bumps. So I just merged the changes into your branch. I also fixed a few leftovers for the old version paths.

Now the PR is ready. Thank you so much for taking on it! I am going to proceed with merging it and releasing the v2 tag.

@georgysavva georgysavva merged commit 4b63ed5 into georgysavva:master Oct 1, 2022
@georgysavva
Copy link
Owner

Here everyone. I created a pre-release for scany/v2: https://github.com/georgysavva/scany/releases/tag/v2.0.0-alpha.2. You can install it the following way: go get https://github.com/georgysavva/scany/v2@v2.0.0-alpha.2.

Please test it out a little bit, and if everything is fine, I will make the stable release.

@kohenkatz
Copy link

Thank you for this PR, but you missed something - import "github.com/jackc/pgtype" should have been changed to "github.com/jackc/pgx/v5/pgtype", as noted in CHANGELOG.md.

georgysavva pushed a commit that referenced this pull request Oct 9, 2022
It looks like in pgx v5 github.com/jackc/pgtype package needs to be replaced with github.com/jackc/pgx/v5/pgtype

https://github.com/jackc/pgx/blob/f803c790d0999e9028cbffefad9df02e4aff913a/CHANGELOG.md#merged-packages

as mentioned by @kohenkatz in PR #94
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.

Are there any plans to support pgx v5?
5 participants