Skip to content

Further improve the nil value handling in arrays - #280

Merged
gwynne merged 1 commit into
mainfrom
finish-nil-fix
Jul 18, 2026
Merged

Further improve the nil value handling in arrays#280
gwynne merged 1 commit into
mainfrom
finish-nil-fix

Conversation

@gwynne

@gwynne gwynne commented Jul 18, 2026

Copy link
Copy Markdown
Member

These changes are now available in 2.16.1

The previous set of fixes was incomplete. This revision correctly handles types which do not accidentally end up going through the legacy fast path via conforming to the deprecated PostgresDataConvertible, as many built-in types still do. The slow path through Encodable can now detect the correct psqlArrayType for all-nil arrays as long as the underlying Element type conforms to PostgresArrayEncodable.

…lly get the old Array: PostgresDataConvertible conformance.
@gwynne gwynne added bug Something isn't working semver-patch Internal changes only labels Jul 18, 2026
@codecov

codecov Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.71930% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.90%. Comparing base (a8ce958) to head (3527c2d).

Files with missing lines Patch % Lines
Sources/PostgresKit/PostgresDataTranslation.swift 87.71% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #280      +/-   ##
==========================================
+ Coverage   43.37%   45.90%   +2.52%     
==========================================
  Files          13       13              
  Lines         853      891      +38     
==========================================
+ Hits          370      409      +39     
+ Misses        483      482       -1     
Files with missing lines Coverage Δ
Sources/PostgresKit/PostgresDataTranslation.swift 73.70% <87.71%> (+3.33%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gwynne
gwynne merged commit 218aaf6 into main Jul 18, 2026
17 checks passed
@gwynne
gwynne deleted the finish-nil-fix branch July 18, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working semver-patch Internal changes only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants