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

Add derives to support custom types #134

Merged
merged 25 commits into from
Mar 18, 2020
Merged

Add derives to support custom types #134

merged 25 commits into from
Mar 18, 2020

Conversation

mehcode
Copy link
Member

@mehcode mehcode commented Mar 17, 2020

Supersedes #97


@Freax13 I've rebased this and did some work. Part of the fall-out is we've since added support for TEXT mode in Postgres. I made a tiny parser for TEXT mode records.

  • Add PgRecordDecoder and PgRecordEncoder to try and encapsulate some logic a little tighter.

  • Implement Type and Decode (but not Encode because Postgres doesn't support it) for tuples (up to an arity of 9).


  • Update struct derives to use new encoder/decoder types
  • Fix derives, Encode is now parametric over a buffer type and Decode is parametric over the raw value
    • transparent
    • records ( structs )
    • weak enums
    • strong enums

I plan on finishing this in a couple days. If you get time before then and would like to assist, I'd appreciate it. If not, no worries.

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.

2 participants