Skip to content

Add PostgresCell #220

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

Merged
merged 3 commits into from
Feb 18, 2022
Merged

Conversation

fabianfett
Copy link
Collaborator

Motivation

In #219 we want to restructure PostgresRow and introduce PostgresRandomAccessRow. To make it very explicit, it would be cool if PostgresRow was implementing Collection and PostgresRandomAccessRow was implementing RandomAccessCollection. However to do this we need an Element type. This is what PostgresCell shall be.

Changes

  • Add PostgresCell
  • Remove PSQLData

Result

We have an awesome Element type for PostgresRow.

@fabianfett fabianfett requested a review from gwynne February 17, 2022 23:50
@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2022

Codecov Report

Merging #220 (2c86c18) into main (4937286) will increase coverage by 4.91%.
The diff coverage is 96.77%.

@@            Coverage Diff             @@
##             main     #220      +/-   ##
==========================================
+ Coverage   43.19%   48.10%   +4.91%     
==========================================
  Files         119      119              
  Lines        8210     8243      +33     
==========================================
+ Hits         3546     3965     +419     
+ Misses       4664     4278     -386     
Flag Coverage Δ
unittests 48.10% <96.77%> (+4.91%) ⬆️

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

Impacted Files Coverage Δ
Sources/PostgresNIO/New/PostgresCell.swift 96.77% <96.77%> (ø)
...urces/PostgresNIO/New/Data/Array+PSQLCodable.swift 94.68% <0.00%> (+1.06%) ⬆️
...rces/PostgresNIO/New/Extensions/Logging+PSQL.swift 19.60% <0.00%> (+1.42%) ⬆️
Sources/PostgresNIO/New/PSQLConnection.swift 31.68% <0.00%> (+1.98%) ⬆️
...s/PostgresNIO/Message/PostgresMessageDecoder.swift 95.45% <0.00%> (+2.27%) ⬆️
...es/PostgresNIO/New/PSQLBackendMessageDecoder.swift 93.28% <0.00%> (+2.98%) ⬆️
...urces/PostgresNIO/New/Messages/ErrorResponse.swift 32.30% <0.00%> (+3.07%) ⬆️
...urces/PostgresNIO/New/Data/Float+PSQLCodable.swift 76.66% <0.00%> (+3.33%) ⬆️
Sources/PostgresNIO/New/PSQLBackendMessage.swift 96.63% <0.00%> (+3.36%) ⬆️
...ources/PostgresNIO/Data/PostgresData+Numeric.swift 70.44% <0.00%> (+3.64%) ⬆️
... and 20 more

Copy link
Member

@gwynne gwynne left a comment

Choose a reason for hiding this comment

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

Other than the one concern, I don't see anything that needs changing... is there a more specific reason to keep this PR separate other than general desire to cut down on large PRs? (A worthy goal, to be sure!)

@fabianfett fabianfett force-pushed the ff-add-psqldata-to-PostgresCell branch from ecfd5db to 4b759b1 Compare February 18, 2022 07:30
@fabianfett fabianfett force-pushed the ff-add-psqldata-to-PostgresCell branch from 4b759b1 to 2ab772b Compare February 18, 2022 09:52
Copy link
Member

@gwynne gwynne left a comment

Choose a reason for hiding this comment

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

Merge away!

@fabianfett fabianfett force-pushed the ff-add-psqldata-to-PostgresCell branch from ed5f306 to 2c86c18 Compare February 18, 2022 10:06
@fabianfett fabianfett merged commit 05eaa2e into vapor:main Feb 18, 2022
@fabianfett fabianfett deleted the ff-add-psqldata-to-PostgresCell branch February 18, 2022 10:15
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