Closed johnbona closed 7 years ago
Merging #28 into master will increase coverage by
0.01%
. The diff coverage is93.75%
.
@@ Coverage Diff @@
## master #28 +/- ##
==========================================
+ Coverage 93.36% 93.37% +0.01%
==========================================
Files 11 12 +1
Lines 1748 1812 +64
==========================================
+ Hits 1632 1692 +60
- Misses 116 120 +4
Impacted Files | Coverage Ξ | |
---|---|---|
Sources/PostgreSQL/Notification.swift | 100% <100%> (ΓΈ) |
|
Tests/PostgreSQLTests/PostgreSQLTests.swift | 95.72% <100%> (+0.22%) |
:white_check_mark: |
Sources/PostgreSQL/Database.swift | 89.13% <85.71%> (-1.5%) |
:x: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Ξ = absolute <relative> (impact)
,ΓΈ = not affected
,? = missing data
Powered by Codecov. Last update c9c0c3a...d95fef7. Read the comment docs.
Not sure what happened there so recreated the PR. π
I'm not all that comfortable with
libpq
so give this extra scrutiny. πI used this example heavily to help me determine how to receive notifications using
libpq
. I also purposefully broke convention and used a closure inlisten
instead of creating aonNotification
property offDatabase
since a database could be listening to multiple channels simultaneously.Couple of things that I wanted to point out for feedback:
listen
since the closure intry background
can't throw? UsingfatalError
right now but not sure if that's the correct approach.Notification
struct. It's not really meant to be used outside thelisten
closure so it's maybe okay to keep named as is even though it collides with Foundation's ownNotification
.