-
-
Notifications
You must be signed in to change notification settings - Fork 82
Add PostgresDynamicTypeThrowingEncodable and PostgresDynamicTypeEncodable #365
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
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #365 +/- ##
==========================================
- Coverage 49.12% 49.01% -0.12%
==========================================
Files 108 108
Lines 8839 8841 +2
==========================================
- Hits 4342 4333 -9
- Misses 4497 4508 +11
|
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.
Let's polish this up a tiny bit 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.
Naming is a bit off right now.
CI complains about breaking api changes, which is a bit worrying. However we have default implementations for the new non-static |
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.
A few more comments. The API breakage checker is false positives.
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.
two small comments
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.
I think now is the correct time to get a review from @gwynne.
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.
A pile of nits, several about wording of comments, a couple about naming.
An additional thought: Would it make sense to also provide utility methods for looking up type OIDs by name (e.g. wrapping SELECT 'foo'::"regtype"::"integer" as "oid"
), or do we want to leave that to the purview of higher-level packages?
Co-authored-by: Gwynne Raskind <[email protected]>
Hmmm personally I feel like this belongs into a higher-level package. As far as I understand PostgresNIO is supposed to provide an interface to build and execute queries, not offer a toolbox of ready-to-use queries. What do you think? |
I tend to agree; I pretty much only brought it up to make sure we're all on the same page 🙂. |
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.
Ship it! 😂
This Is wonderful work! ❤️
@gwynne What about this comment?
We would still need to add protocol conformance to the different sequence types, wouldn't we? |
Good to hear that you like it! 😁 |
Exactly the opposite - withholding the conformance from any sequence types (including All this being said, that comment was never intended to block this PR; I'd go for trying to address it in a different PR (but before this one gets included in a tagged release, otherwise it'd involve revising public API and it'd be a basically permanent mess). |
Ahhh got it! |
@fabianfett Ping on this - do you still have any blocking concerns? @marius-se Ping as well - can you resolve the merge conflicts and bring this up to date with |
IIRC all good from my side. @marius-se can you bring this in line with |
@marius-se small ping... shall I move this forward? |
Oh sorry @fabianfett! I'm currently traveling through New Zealand (without electricity 😅). If you need the changes on main now feel free to take this over! Otherwise I'll be back in 3-4 weeks :) |
API breakage checker complain. Will need to research this one:
|
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. The API breakage checker complains are false positives.
@marius-se Thanks so much for pushing this through! |
Closes #333
Example: