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

Replace pgxtype.Querier with pgx.Tx #1188

Merged
merged 8 commits into from Sep 28, 2022

Conversation

w84thesun
Copy link
Contributor

@w84thesun w84thesun commented Sep 27, 2022

Description

This PR closes #1161.

Readiness checklist

  • I added tests for new functionality or bugfixes.
  • I ran task all, and it passed.
  • I added/updated comments for both exported and unexported top-level declarations (functions, types, etc).
  • I checked comments rendering with task godocs.
  • I ensured that the title is good enough for the changelog.
  • (for maintainers only) I set Reviewers (@FerretDB/core), Assignee, Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@vercel
Copy link

vercel bot commented Sep 27, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
ferret-db ✅ Ready (Inspect) Visit Preview Sep 28, 2022 at 2:10PM (UTC)

@w84thesun w84thesun self-assigned this Sep 27, 2022
@w84thesun w84thesun added the code/chore Code maintenance improvements label Sep 27, 2022
@w84thesun w84thesun added this to the v0.6.0 Alpha milestone Sep 27, 2022
@vercel vercel bot temporarily deployed to Preview September 27, 2022 23:21 Inactive
@codecov
Copy link

codecov bot commented Sep 27, 2022

Codecov Report

Merging #1188 (45f3bdd) into main (e919083) will decrease coverage by 0.08%.
The diff coverage is 86.95%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1188      +/-   ##
==========================================
- Coverage   66.41%   66.33%   -0.09%     
==========================================
  Files         251      251              
  Lines       12293    12293              
==========================================
- Hits         8165     8154      -11     
- Misses       3238     3248      +10     
- Partials      890      891       +1     
Impacted Files Coverage Δ
internal/handlers/pg/pgdb/query.go 40.68% <50.00%> (ø)
internal/handlers/pg/pgdb/settings.go 39.53% <82.35%> (-4.66%) ⬇️
internal/handlers/pg/msg_listcollections.go 61.11% <100.00%> (ø)
internal/handlers/pg/pgdb/collections.go 50.00% <100.00%> (ø)
internal/handlers/pg/pgdb/schemas.go 80.00% <100.00%> (ø)
internal/handlers/pg/pgdb/tables.go 64.70% <100.00%> (ø)
internal/clientconn/conninfo/conn_info.go 66.66% <0.00%> (-16.67%) ⬇️
internal/util/version/version.go 55.00% <0.00%> (-5.00%) ⬇️
internal/handlers/common/filter.go 86.58% <0.00%> (ø)
Flag Coverage Δ
integration 62.62% <86.95%> (-0.08%) ⬇️
mongodb 14.87% <8.69%> (+0.01%) ⬆️
pg 51.86% <86.95%> (-0.08%) ⬇️
tigris 34.67% <0.00%> (-0.03%) ⬇️
unit 24.00% <80.43%> (-0.05%) ⬇️

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

@vercel vercel bot temporarily deployed to Preview September 27, 2022 23:41 Inactive
@vercel vercel bot temporarily deployed to Preview September 28, 2022 09:50 Inactive
@vercel vercel bot temporarily deployed to Preview September 28, 2022 09:58 Inactive
@w84thesun w84thesun marked this pull request as ready for review September 28, 2022 10:04
@w84thesun w84thesun requested review from a team and AlekSi as code owners September 28, 2022 10:04
@w84thesun w84thesun requested review from rumyantseva, a team and noisersup and removed request for a team September 28, 2022 10:04
go.mod Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview September 28, 2022 10:17 Inactive
rumyantseva
rumyantseva previously approved these changes Sep 28, 2022
Copy link
Member

@rumyantseva rumyantseva left a comment

Choose a reason for hiding this comment

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

I'm not 100% sure about pgdb_test.go (do we want everything to have their own transaction?)

But in general, LGTM.

Copy link
Member

@rumyantseva rumyantseva left a comment

Choose a reason for hiding this comment

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

LGTM

@vercel vercel bot temporarily deployed to Preview September 28, 2022 14:10 Inactive
@AlekSi AlekSi merged commit ff46f66 into FerretDB:main Sep 28, 2022
@w84thesun w84thesun deleted the issue-1161-use-tx-in-pgdb branch October 3, 2022 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/chore Code maintenance improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move all pgdb code to using pgx.Tx
4 participants