-
Notifications
You must be signed in to change notification settings - Fork 4
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
Update pgx to v5 #27
Update pgx to v5 #27
Conversation
@@ -16,11 +16,9 @@ jobs: | |||
# - macOS-latest | |||
# - windows-latest | |||
go: | |||
- "1.22" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
最新の3バージョンまでテストするようにしました。
@@ -40,7 +38,7 @@ jobs: | |||
uses: actions/checkout@v4 | |||
|
|||
- name: Lint | |||
uses: golangci/golangci-lint-action@v4 | |||
uses: golangci/golangci-lint-action@v6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ついでにv6へ上げました。
@@ -58,11 +58,9 @@ type Job struct { | |||
// Queryer is interface for query | |||
type Queryer interface { | |||
Begin(ctx context.Context) (pgx.Tx, error) | |||
BeginFunc(ctx context.Context, f func(pgx.Tx) error) (err error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
特に内部で利用していないのに型定義をしているものがあったので不要なものを削除しました。
@@ -34,7 +34,7 @@ func openTestClientMaxConns(ctx context.Context, t testing.TB, maxConnections in | |||
// make lifetime sufficiently long | |||
config.MaxConnLifetime = 5 * time.Minute | |||
|
|||
pool, err := pgxpool.ConnectConfig(ctx, config) | |||
pool, err := pgxpool.NewWithConfig(ctx, config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
アップデートによる関数名変更です。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🥇
pgxをv4.18.3からv5.6.0へアップデートします。
v4からv5のChangelogは以下の通りです。
https://github.com/jackc/pgx/blob/master/CHANGELOG.md#v500-september-17-2022
qgでは以下の軽微な影響がありました。